Instagram API 回复不正确?

Instagram API doesn't response correct?

如果我使用这个 link 的 Instagram API 我什么也得不到:

https://api.instagram.com/v1/locations/1/media/recent?access_token=XXXX

回复:

{"pagination": {}, "meta": {"code": 200}, "data": []}

文档说有参数 max_idmin_id,但我不确定如何使用它们。 如果我这样使用它:

https://api.instagram.com/v1/locations/10/media/recent?access_token=XXXX&min_id=1&max_id=20

我得到的结果和上面一样。

两个位置 ID(1 和 10)都正确。

那是因为您处于沙盒模式。

在沙盒模式下,您只会在 API 中看到您的 posts(和您批准的沙盒用户),并且 API 响应中的总 posts 也是仅限 20 个。

如果您想在沙盒模式下的 API 响应中看到 posts,那么您可以使用 Instagram 应用将 post 标记添加到某个位置,然后通过以下方式访问该位置API,您将在 API 回复中看到您的 post。获得 public_content 许可并进入实时模式后,您将看到所有 posts.

这里是关于沙盒模式的更多信息:https://www.instagram.com/developer/sandbox/

The behavior of the API when you are in sandbox mode is the same as when your app is live, but comes with the following restrictions:

  • Data is restricted to sandbox users and the 20 most recent media from each sandbox user
  • Reduced API rate limits