【问题标题】:How can I find the most liked images of the day on Instagram?如何在 Instagram 上找到当天最受欢迎的图片?
【发布时间】:2013-10-15 23:55:25
【问题描述】:

Instagram API 的文档确实没有那么完善。

有谁知道我可以按位置找到(当天)最受欢迎的 Instagram 照片的方法吗?比如,今天大多数丹麦人喜欢什么样的照片……

谢谢!

【问题讨论】:

    标签: javascript php json instagram


    【解决方案1】:

    如果你知道你想要的位置 ID,你应该能够使用位置获取热门照片

    https://api.instagram.com/v1/locations/{location-ID}/media/popular?MIN_TIMESTAMP={UNIX timestamp for beginning of day}&access_token={access token}
    

    您可以使用位置/搜索查询来搜索位置 ID,如下所示:

    https://api.instagram.com/v1/locations/search?lat={latitude}&lng={longitude}&access_token={access token}
    

    在这两个 URL 中,{} 表示您需要定义的变量。

    参考: http://instagram.com/developer/endpoints/locations/

    【讨论】:

    • 感谢您的回答。我得到了 GPS 坐标(经纬度),将它们放在 url 而不是 {latitude} 和 {longitude} 中,这给了我一个位置列表。我取了一个位置 ID,并添加了昨天午夜的 UNIX 时间戳。我还生成了一个访问令牌。结果是这个 URL:api.instagram.com/v1/locations/2608967/media/…,它在 instagram 上给了我一个“找不到页面”...
    • 嗨@Giveny。你成功了吗?我需要同样的东西。
    猜你喜欢
    • 2021-02-20
    • 1970-01-01
    • 2012-03-24
    • 2013-11-20
    • 2015-10-04
    • 1970-01-01
    • 1970-01-01
    • 2022-01-22
    • 1970-01-01
    相关资源
    最近更新 更多