我在哪里可以使用Instagram的API时找到的位置位置ID [英] Where I can find location id of location when using Instagram API

查看:281
本文介绍了我在哪里可以使用Instagram的API时找到的位置位置ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用Instagram的API来从给定位置获得最近媒体对象的列表。
我使用这个网址。
现在,我不能这样做,因为我不知道我应该采取的位置ID?


解决方案

1。
第一次使用 Facebook的图形API 来搜索位置,并获得 facebook_places_id 。下面是一个例子:

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

2。
获取 facebook_places_id 和使用本 Instagram的位置搜索API 来获得相应的 instagram_location_id

<$p$p><$c$c>https://api.instagram.com/v1/locations/search?facebook_places_id=273471170716&access_token=ACCESS-TOKEN

3。
获取位置 ID 然后进行 Instagram的地点媒体API 获得最近媒体:

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

下面是一个使用上面的方法Instagram的位置媒体搜索的实现: <一个href=\"http://www.gramfeed.com/instagram/places\">http://www.gramfeed.com/instagram/places

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. 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

这篇关于我在哪里可以使用Instagram的API时找到的位置位置ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆