如何在android中获取instagram api的location-id

时间:2014-05-07 10:50:59

标签: android location instagram

我正在制作一个与instagram相关的android应用程序,以便我读完所有Instagram开发人员apis之后我尝试了第一次用户身份验证它工作正常我通过user-id api访问用户数据。现在我想要我的位置信息需要location-id。我不知道我会在哪里获得

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

在第一个网址中我获得了userid,我正在检索信息 在第二个网址我不知道位置ID请帮助我

1 个答案:

答案 0 :(得分:0)

1:首先使用脸谱图API搜索位置并获取 facebook_places_id 。这是一个例子:

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

获取 facebook_places_id 并使用此Instagram位置搜索API获取相应的 instagram_location_id

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

2:获取位置ID ,然后制作instagram位置媒体API以获取最近的媒体:

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: