My apologies if I'm not using the most technical terms in my question as I am asking on behalf of a development team who is creating an app for me, but we are having trouble making a call to the Foursquare API to get public photos (at least one) of specific venues.
Until now they have only been able to get low resolution photos and are telling me we need to be authenticated but I'm not sure they are explaining what they need to me correctly.
I have searched for hours and have not been able to understand how we would be able to obtain at least one photo for a given venue. The closest I have come to is getting a list of photos for a venue using the example query: https://api.foursquare.com/v2/venues/43695300f964a5208c291fe3/photos?oauth_token=...TOKEN...&v=20130529
This involves the OAuth_Token and I had understood we didn't need this to get an image of a venue using the API.
Once again, apologies if I'm using any terms incorrectly as I am not a programmer myself. Thanks.
That call to venues/VENUE_ID/photos is indeed a way to solve your problem: you can do that to get public photos for specific venues, where the specific venue is identified by VENUE_ID. You don't need an OAuth token; instead, you can simply pass in client_id and client_secret parameters. Examine the URL pattern we document under "Userless access" here: https://developer.foursquare.com/overview/auth#userless
Once you have these responses, you need to construct a photo URL, and this is where you can specify the desired size. For each photo response, you take prefix + size + suffix to construct a full URL. For an example, see https://developer.foursquare.com/docs/responses/photo
Related
So right now the only thing I could find is to use this user less request
https://api.foursquare.com/v2/venues/explore/?client_id=CLIENT_ID&client_secret=CLIENT_SECRET&v=20130815&ll=40.7,-74&query=canes&near=kenner&venuePhotos=1
But this only returns 1 photo in the photos object for every place, even if that place has more then one public photo
https://foursquare.com/v/raising-canes-chicken-fingers/4b4e7802f964a520dfee26e3
This is an example, when I get this locations info it only puts the first image in the json response but theres 19 photos
i figured it out
https://api.foursquare.com/v2/venues/4b4e7802f964a520dfee26e3/photos?client_id=XXXXX&client_secret=XXXXX&v=20130815&ll=40.7,-74
the docs only show a example on getting the photos with a oauth token. I just happened to guess doing it like this and it worked.
I'm looking to somehow tell users to upload a picture and do something, either tag or # our company so we are notified in real time, i just need to fetch the url of the photo that was uploaded and tagged or # or ANYTHING.
the hashtag search doesn't seem to work correctly, i've tried multiple hashtags and they wont retrieve them in any type of real time or at all.
the real-time subscription only notifies me that there is a new photo tagged that i subscribed to, so i have api search for a list of new media with that tag, which goes back to point 1, its not accurate or reliable.
so do i have any options at all on instagram?
If not do I have any options on facebook? any real time keyword search to grab the url of the photo they uploaded with a unique tag.
Check out https://github.com/chapmanu/hummingbird, it might be what you're looking for.
My experience with the Instagram Real-Time API is, that it is rather reliable.
When you get a real-time ping and then call the endpoint for your hashtag, the results are ordered newest first.
You can then paginate until you hit the last known result.
Maybe this tutorial helps: http://www.mtrinitaria.com/mykhel/tutorial-instagram-real-time-photo-update-api-with-php/
I'm trying to get one good photo result on the Foursquare API which are representative of a venue.
Currently I'm using:
https://api.foursquare.com/v2/venues/VENUE_ID/photos?group=venue&limit=1
This works, but it appears that the photo filtered is always the most recently added photo for that venue, which is not necessarily always the best. There also doesn't seem to be anyway to any sort differently (by rating etc.). I would prefer that the photo that appears be always the first photo result on the foursquare website for the venue, whatever that may be.
I was playing around with the suffix, and I found that if instead of
photos?group=venue&limit=1
I just put
photos?&limit=1
I would get the results I am looking for (the first photo that appears on the website for that venue). However, on the documentation it says that having a group value is required. Obviously, I don't want to set behavior based on a bug, but it works.
So, is it a bug? Or is it just a problem with the documentation that says group is required. Any help would be appreciated.
Thanks!
That's probably a bug you're encountering, but to get the first photo on the venue page, you can query the venues detail endpoint and then use the photo object in the venue result: https://developer.foursquare.com/docs/explore#req=venues/40a55d80f964a52020f31ee3
We would like to be able to pull out certain places from foursquare an categorize them on our website along with comments from foursquare users. I have the following questions:
1- Can we pull out places and categorize them the way we want on our website? e.g: restaurants/bar/lounge/club/landmarks/others.
2- can we pull out as well phone numbers (when available) and addresses (longitude-lattitude) of places ?
3- Does foursquare have any general descriptive summaries of each place?
Thanks for the help.
Chris
Foursquare has an API, more information can be found at this link
To answer your questions:
Yes, check out the Venues Platform in 4sq API, specifically, the search. When you query the API, as part of the result set for each venue, you get a category
If available, you will get them back under the 'contact' field, check out the response venue object from the search function
Yes, description field, you will need to make an API request to get the complete venue object.
Edit: one last thing, attribute and play nice :)
From my experience, you do not get a lot of venues with 'contact' and 'description' information. But foursquare is not very popular where I test my application, so it might be bad experience - experiment with it yourself.
FourSquare has a great category tree that you can use for categorizing restaurants
http://aboutfoursquare.com/foursquare-categories/
Actually, I'm using this tree in my website:
Dishes Map
For some reason, when searching on one specific Twitter user, the search API return nothing. (ie http://search.twitter.com/search.atom?q=+from%3ATWITTERHANDLE_A) TWITTERHANDLE_A here is the Twitter account name. This user has been active for over a month, has had many RTs, #s and has sent such tweets out as well.
Meanwhile, I created a new Twitter account - we will call it TWITTERHANDLE_B. Immediately after I created the account, I sent 1 tweet and performed the same search as above (http://search.twitter.com/search.atom?q=+from%3ATWITTERHANDLE_B)
The tweet was returned.
Is there ANYWAY to find out if and/or why a particular user would be blocked from search results? Thanks so much for any help... I'm going crazy here. Twitter's documentation just says sometimes a user's tweets won't be searched!
The documentation you refer to has a link to this page:
http://support.twitter.com/forums/10713/entries/42646
The bottom entry addresses your issue, hopefully you can fix it that way.
Bear in mind the search API only grabs results from the last couple of weeks, so if the user hasn't tweeted in a while then there won't be any results.
You could try not using the Search API and grab the results directly:
http://twitter.com/statuses/user_timeline/-username-.json
Works fine for http requests at least... >_<