Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
484 views
in Technique[技术] by (71.8m points)

ios - Where I can find location id of location when using Instagram API

I want to use Instagram API to get a list of recent media objects from a given location. I am using this URL. Now I can't do that, because I don't know where I should take location id?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

1. First use facebook graph API to search 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 the 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 location id and then make the instagram location media API to get recent media:

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

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...