is it possible to find all the cities near me if I send to the foursquare api a longitude and latitude?
I been looking at their api and not seeing it.
Thanks
Unfortunately this isn't something that the Foursquare API supports.
Related
I'm starting with Instagram API and I notice that there is no way to search media for a certain area. API only lets me to search through lat/long. Is there anyway to get media from an area? For example Flickr's API lets to ask for regions/counties...
In other case, any idea to do this in a simple way?
Thanks in advance,
Regards
You have two ways of doing this with the Instagram api:
Use the get media/search endpoint to find media for an area defined by lat/lng and a radius. You can specify a radius up to 5000 meters to capture media for a large area.
api.instagram.com/v1/media/search?lat=48.858844&lng=2.294351&distance=5000
Use the /locations/location-id/media/recent endpoint to find media assigned to locations. Some cities, towns, regions, etc are set up as locations. These aren't very reliable and there are often duplicates. You would need to use the /locations/search endpoint to find the location id's first.
api.instagram.com/v1/locations/514276/media/recent
I'm using another venues provider, but would like to search Foursquare from the venue results of that provider for Foursquare checkins. Is this possible or would that be considered violating the TOS?
Why not read the Policy at https://developer.foursquare.com/overview/community ?
Whats written there as of writing this answer is that it is okay to extend their results with other data sources.
It is not okay to search across both foursquare and Google Places, then return a combination of their results/data.
What I would do if I am doing something I am not sure of is just ask them directly at https://developer.foursquare.com/overview/support
At the last paragraph they talk about policy (at the support page), says you can email them directly.
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
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).
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.
Can I get events from Foursquare API or just places?
You can get events via the API, documented at https://developer.foursquare.com/. In particular these two endpoints are probably what you're looking for:
https://developer.foursquare.com/docs/venues/events
https://developer.foursquare.com/docs/events/events
Note that there are limits on what sort of events you'll be able to retrieve as noted in the description for /venues/events
using the Foursquare API I am currently able to get a venue Mayor but can I got the Top5 user?
Thanks
To get the top 5 (or 10) users for a venue, you'll need to use foursquare's Merchant API and act on the behalf of the venue's manager.
In particular, you'd use the /venues/stats endpoint (https://developer.foursquare.com/merchant/venues/stats.html). For more information about the Merchant API and venue managers, see: https://developer.foursquare.com/merchant/
In short no. The best you can get is the stats from a venue: Foursquare API Venue those contain: "Contains checkinsCount (total checkins ever here), usersCount (total users who have ever checked in here), and tipCount (number of tips here)."
From my experience the API is almost designed to avoid this sort of info gathering. Best way would be watch as people check in to the venue and create your own stats from that information.