【问题标题】:Instagram API: does the /users/self/media/recent endpoint have a time limit?Instagram API:/users/self/media/recent 端点是否有时间限制?
【发布时间】:2016-11-16 10:36:27
【问题描述】:

我正在尝试为拥有 24 个帖子的用户迭代所有 Instagram 帖子(计数 = 8)。第一个结果返回 8 个帖子和以下分页对象:

Request:
{ count: 8, max_id: undefined }

Response:
results =  8
pagination = {
  next_url: 'https://api.instagram.com/v1/users/991120266/media/recent?access_token=TOKEN&count=8&max_id=653406866835254619_991120266',
  next_max_id: '653406866835254619_991120266',
}

Request:
{ count: 8, max_id: '653406866835254619_991120266' }

Response:
results =  8
pagination =  {
  next_url: 'https://api.instagram.com/v1/users/991120266/media/recent?access_token=TOKEN&count=8&max_id=653404659733769534_991120266',
  next_max_id: '653404659733769534_991120266',
 }

Request:
{ count: 8, max_id: '653404659733769534_991120266' }

Response:
results =  4
pagination =  {}

它正确地获取了用户的 16 个最新的 Instagram 帖子,但在最后一个请求中,它只返回 4 个帖子并忽略了最旧的 4 个帖子。为什么 Instagram 不返回最后 4 个帖子?我也尝试将“count”设置为 30,但它仍然只返回相同的 20 个结果。我还尝试将 min_id 设置为 0 而不是 max_id 但它也不会返回这些帖子。

【问题讨论】:

    标签: instagram instagram-api


    【解决方案1】:

    糟糕,我使用的是沙盒应用,每位用户只能获得 20 个结果!解决方案:让应用获得批准以退出沙盒。

    【讨论】:

    • 一旦你离开沙盒模式,你能得到所有用户过去的媒体吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-08-10
    • 1970-01-01
    • 2016-08-25
    • 2016-12-26
    • 2023-03-08
    • 1970-01-01
    相关资源
    最近更新 更多