user1198955
user1198955

Reputation: 1

Foursquare API for mobile application

Im new to foursquare api. I would like to know whether foursquare api will return the latitude and longitude of the user location(when GPS enabled), or should we use another method to get current user location.

Thanks in advance

Upvotes: 0

Views: 862

Answers (2)

Larry Enzer
Larry Enzer

Reputation: 51

I have found that when using venue/search, etc. to find information, the response back to the api web call is filled with all sorts of information, including a "field" called location, that on android systems had to cast to JSONobject then you can get the lat and long of that place and distance from you if used with radius. Like above, use your gps and the development language to get that information.

Upvotes: 0

chozero
chozero

Reputation: 411

You should get current user location reading GPS data from user device and use it when requesting Foursquare API endpoints. For an example, see https://developer.foursquare.com/docs/venues/search

As far as I know, a server API (such as Foursquare) has no means to get your current location except for Geo-IP services (not always accurate).

Upvotes: 4

Related Questions