【问题标题】:how to get location-id of instagram api in android如何在android中获取instagram api的位置ID
【发布时间】:2017-07-27 13:08:22
【问题描述】:

我正在制作一个与 instagram 相关的 android 应用程序,以便我阅读所有 instagram 开发人员 api 之后我尝试了第一次用户身份验证它工作正常我正在通过用户 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

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

【问题讨论】:

    标签: android location instagram


    【解决方案1】:

    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
    

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

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

    2:获取location id,然后制作instagram location media 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:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-04-13
      • 1970-01-01
      相关资源
      最近更新 更多