使用 Instagram API 时在哪里可以找到位置的位置 ID [英] Where I can find location id of location when using Instagram API
问题描述
我想使用 Instagram API 从给定位置获取最近的媒体对象列表.我正在使用这个网址.现在我不能这样做,因为我不知道我应该在哪里获取位置 ID?
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?
推荐答案
1.首先使用facebook graph API
搜索位置并获取facebook_places_id
.下面是一个例子:
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¢er=37.77493,-122.419415&distance=5000&access_token=ACCESS-TOKEN&expires_in=5184000
2.获取facebook_places_id
并使用这个instagram location search API
获取对应的instagram_location_id
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.获取位置id
,然后制作instagram location media API
获取最近的媒体:
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
以下是使用上述方法实现的 Instagram 位置媒体搜索:http://www.gramfeed.com/Instagram/地方
Here is an implementation of Instagram location media search using the above method: http://www.gramfeed.com/instagram/places
这篇关于使用 Instagram API 时在哪里可以找到位置的位置 ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!