如何在Android中获取Instagram API的位置ID [英] how to get location-id of instagram api in android

查看:76
本文介绍了如何在Android中获取Instagram API的位置ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个与instagram相关的android应用程序,以便在我尝试进行首次用户身份验证后可以读取所有instagram开发人员api,现在一切正常,我正在通过user-id api访问用户数据.现在我想要该位置信息需要location-id.我不知道去哪里

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

在第一个URL中,我获得了用户ID,并且正在检索信息在第二个网址中,我不知道location-id,请帮助我

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

推荐答案

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&center=37.77493,-122.419415&distance=5000&access_token=ACCESS-TOKEN&expires_in=5184000

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

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:获取位置ID ,然后使用instagram位置媒体API获取最新媒体:

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:这是使用上述方法的Instagram位置媒体搜索的实现:

这篇关于如何在Android中获取Instagram API的位置ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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