我在使用Instagram API时可以找到位置的位置ID

Rau*_*les 9 api ios instagram swift

我想使用Instagram API来获取给定位置的最新媒体对象列表.我正在使用此URL.现在我不能那样做,因为我不知道我应该把位置id带到哪里?

kri*_*rak 9

1.首先用于facebook graph 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
Run Code Online (Sandbox Code Playgroud)

2.获取facebook_places_id并使用它instagram location search API来获得相应的instagram_location_id

https://api.instagram.com/v1/locations/search?facebook_places_id=273471170716&access_token=ACCESS-TOKEN
Run Code Online (Sandbox Code Playgroud)

3.获取位置id,然后instagram location media API进入最近的媒体:

https://api.instagram.com/v1/locations/514276/media/recent?access_token=ACCESS-TOKEN
Run Code Online (Sandbox Code Playgroud)

以下是使用上述方法实现Instagram位置媒体搜索:http://www.gramfeed.com/instagram/places


Far*_*ini 6

如果您可以获取该位置的纬度和经度,则可以使用以下代码查找该特定位置的图像:

https://api.instagram.com/v1/media/search?lat=48.858844&lng=2.294351&access_token=ACCESS-TOKEN
Run Code Online (Sandbox Code Playgroud)