how to get location-id of instagram api in android

試著忘記壹切 提交于 2021-02-08 08:15:23

问题


I am making one android application related to instagram so that I read all instagram developer apis after that i tried first user authentication it is working fine I am accessing user data by user-id api.Now i want location information for that i need location-id.I don't know where will i get

with user-id:
https://api.instagram.com/v1/users/**userid**/?access_token=13145898924.f59def8.f14ee72f42f14bea9f56d6dc96924483 

with location-id:
https://api.instagram.com/v1/locations/location-id?access_token=13145898924.f59def8.f14ee72f42f14bea9f56d6dc96924483

in first url I got userid and I am retrieving information in second url i don't know location-id please help me


回答1:


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

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

2: 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

3: Here is an implementation of Instagram location media search using the above method:



来源:https://stackoverflow.com/questions/23515771/how-to-get-location-id-of-instagram-api-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!