Foursquare API for nearby places iPhone - iphone

I want to get the nearby place by passing the current lat-long.
And want to get photos of that place.
I have got this link:
http://api.foursquare.com/v1/venues.json?geolat=40.82&geolong=-74.1&l=50&q=pizza
But it is showing me
Error page
How do i get this error solved?
Please help me and suggest a FourSquare API URL which will help me to get the place information and photos of current lat-long.
Thanks

The v1 API is no longer functional. You'll need to use v2.
https://developer.foursquare.com/docs/venues/search

I'm working on a similar app...
Use API explorer to create and test the string you'd like to use
As Gilbert said, you have to use v2, this is an example of a valid link...
https://api.foursquare.com/v2/venues/search?ll=45.49,15.59&categoryId=4bf58dd8d48988d1c4941735&radius=3000&oauth_token=A5ZDWL2DLXPZCQ3ZJESVOAKDMPQHSNNVWC3UMVOUOXPQHWRT&v=20121105
As you can see, you also must have &oauth_token=A5ZDWL2DLXPZCQ3ZJESVOAKDMPQHSNNVWC3UMVOUOXPQHWRT&v=20121105 at the end of the URL link...
When you're in an API Explorer copy the link below the textbox and it should work...
Take a look here:

Related

Facebook Graph API - Getting Comments

I'm trying to use Facebook graph API to get all the comments (mine and others) on my Facebook posts.
Currently I'm testing the api using Graph API Explorer & so far I'm getting only my comments.
I want to know did they change their policy or is there a way to get all the comments?
P.S: I didn't write any code so far.
But I followed the link:
https://developers.facebook.com/docs/graph-api/get-started
to use the graph API explorer and this is what I'm getting:
the image
In the "Tools" you will find the tool. And as you can see you will get the list of the comments. I'm just showing one of my comments (testingggg) as an example.
Unfortunately, the API doesn't give me the others' comments.
Am I missing something?
Thank you.
according to the document this is the way to get all the comment docs

Use of FourSquare API to find nearby places in iOS SDK

How to use Foursquare API to find nearby places in iOS Applications.
As I am new in this environment.. So please help me to find any sample tutorial available on the API.
I had gone through this link, And I got the response "error type" : deprecated so please provide another link for this same solution..
Thanks in advance..
You can try looking at this link for more information about Objective-C libraries that work with the foursquare API.
Edit: Currently this one appears to be the more recent, more chances of it working properly, also good documentation there on how to integrate it. It is the second one listed in the foursquare library page.
Also check out the foursquare developer site in general, you will need to know the different endpoints and what data they return anyway => https://developer.foursquare.com/
this Link is pretty good,comes with little instruction, u can use the search venues,check in,photo services..heaven!
go through foursquare Api page for desired modification.
in the FSQMasterViewController.m file you need to #define kClientID #"yourClientId"
and #define kCallbackURL #"ur callback url"
fix your infoPlist the urlSchemes too

get list of places from Foursquare like Facebook places and Google places

I have to show a list of nearby stores, hospitals, cinemas and all according the user's latest location. I have done this thing using Facebook and Google APIs,
like this:
Google: https://maps.googleapis.com/maps/api/place/search/json?location=%f,%f&radius=2414.016&sensor=false&key=YOUR_API_KEY
Facebook: https://graph.facebook.com/search?type=place&center=%f,%f&distance=1000&acces_token=YOUR_ACCESS_TOKEN
How can I achieve the same thing in Foursquare?
https://developer.foursquare.com/docs/venues/explore.html
You can do that by following link
http://api.foursquare.com/v1/venues?geolat=yourlatitudevalue&geolong=yourlongitudevalue&q=yourkeyword.
for example restaurant keyword
http://api.foursquare.com/v1/venues?geolat=23.0081171&geolong=72.5234406&q=restaurant
You can find samples for API under following link.
https://developer.foursquare.com/docs/samples.html
Hope it helps.

FourSquare API for iphone

As I need to integrate the foursquare in my application,
I have found the API and also integrate in my application. But there is some problem.
I want to show the nearest venue around me. As there is also method to show the venue
+(void)searchVenuesNearByLatitude:(NSString*)lat
longitude:(NSString*)lon
accuracyLL:(NSString*)accuracyLL
altitude:(NSString*)altitude
accuracyAlt:(NSString*)accuracyAlt
query:(NSString*)query
limit:(NSString*)limit
intent:(NSString*)intent
callback:(Foursquare2Callback)callback;
But the problem is what are the parameter need to pass for search venue which are in area of 5 KM.
Can any one help me to solve this problem.
Thanks in advance,
kunal patel.
Andreas has made a good example iphone project that hosted on github
I tried it and it's working very well take a look at https://github.com/anka/bw_examples/tree/master/FoursquareIntegration
Good luck
accuracyLL - this stands for accuracy Latitude Longitude.
Your foursquare library you'll see it's a wrapper for the foursquare API documented here: https://developer.foursquare.com/docs/venues/search.html
llAcc is the location accuracy in meters. For 5Km you would use 5000.
If you use oauth login method that would become more easy, You have to login through oauth 2.0 then using access token you can get any user details. I have found a very nice tutorial related to oauth, I hope this would help you

Getting facebook profile picture

i need to get the facebook profile picture of anyone by passing their id. But i no need to use facebook API or Graph anything else.. Just i need to give the url with that id.. Is it possible to get the profile picture in this way? I tried in google but i didnt get it. If anyone knows this please respond me...
Well, I think the only options available are:
https://graph.facebook.com/[PROFILE_ID]/picture (You can include this URL inside a tag and it will work).
Scrap yourself the page corresponding to the profile, i.e. http://www.facebook.com/profile.php?id=[PROFILE_ID] and get the URL of the picture there.
I would suggest you to use the first one, because it gives you more flexibility about the picture size (?type=small, ?type=thumbnail, etc).
Edit
Keep in mind that this answer is from 2011, and Facebook makes changes in its APIs frequently.
Apart from using Graph API as already mentioned above (https://graph.facebook.com/[PROFILE_ID]/picture), there are a couple more ways:
FlipTop has a service that pulls up all sorts of information on Facebook users, including direct CDN URLs (e.g. https://fbcdn-profile-a.akamaihd.net/hprofile-ak-snc4/275588_504804917_147319_n.jpg) of profile pictures. (Link to API documentation)
Cloudinary has a similar service, but with hosting thrown in the mix. They do require you to open an account, but it's free. Then you can use their CDN URL format to link to any picture like this: http://res.cloudinary.com/[YOUR_ACCOUNT]/image/facebook/[PROFILE_ID].jpg (Read more here)