Where can I find the location location id when using the Instagram API

I want to use the Instagram API to get a list of the latest media objects from a specific location. I use this URL. Now I can not do this because I do not know where to get the location identifier?

+8
api ios swift instagram
source share
2 answers

1. First use the facebook graph API to search for locations and get facebook_places_id . Here is an example:

 https://graph.facebook.com/search?q=&type=place&center=37.77493,-122.419415&distance=5000&access_token=ACCESS-TOKEN&expires_in=5184000 

2. Get facebook_places_id and use this instagram location search API to get the corresponding instagram_location_id

 https://api.instagram.com/v1/locations/search?facebook_places_id=273471170716&access_token=ACCESS-TOKEN 

3. Get the id location, and then create an instagram location media API to get the latest files:

 https://api.instagram.com/v1/locations/514276/media/recent?access_token=ACCESS-TOKEN 

The following is an implementation of media search in Instagram using the above method: http://www.gramfeed.com/instagram/places

+9
source share

If you can get the latitude and longitude of a location, you can use the following code to search for images from this particular place:

 https://api.instagram.com/v1/media/search?lat=48.858844&lng=2.294351&access_token=ACCESS-TOKEN 
+5
source share

All Articles