【问题标题】:Where I can find location id of location when using Instagram API使用 Instagram API 时在哪里可以找到位置的位置 ID
【发布时间】:2014-10-30 05:21:19
【问题描述】:

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

【问题讨论】:

    标签: ios api swift 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
    

    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
    

    3。 获取位置id,然后使instagram location media API 获取最近的媒体:

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

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

    【讨论】:

    • 感谢您的回答。如果我将使用 Google 地图 API 怎么办?好点吗? @krisrak
    • google maps API 不会帮助获取位置 ID,您可以在使用上述步骤后使用它来映射位置
    【解决方案2】:

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

    https://api.instagram.com/v1/media/search?lat=48.858844&lng=2.294351&access_token=ACCESS-TOKEN
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-07-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多