我用过这个URL
获取近期媒体关于具体tag
喜欢 cats
使用 Instagram API
. URL
是这样的:
https://api.instagram.com/v1/tags/cats/media/recent?access_token=*****
不幸的是,没有数据,我得到了以下
warning
在 pagination
:{"pagination":{"deprecation_warning":"next_max_id and min_id are deprecated for this endpoint; use min_tag_id and max_tag_id instead"},"meta":{"code":200},"data":[]}
我怎样才能得到
min_tag_id
或 min_tag_id
?为什么没有data
?
最佳答案
我假设您在 2015 年 11 月 17 日之后为此请求创建了您的客户端。Instagram 对其 API 进行了一些更改,请参阅 here .
Apps created on or after Nov 17, 2015 will start in Sandbox Mode and function on newly updated API rate-limits and behaviors.
您的应用程序/客户端可能处于沙盒模式,因此其行为有限。它写在文档中,section API behaviour :
Data is restricted to sandbox users and the 20 most recent media from each sandbox user.
[...]
As another example, let's consider an endpoint that returns a list of media: /tags/{tag-name}/media/recent. The response returned by this endpoint will contain only media with the given tag, as expected. But instead of returning media from any public Instagram user, it will return only media that belongs to your sandbox users, restricted to the last 20 for each user.
如果您使用沙盒用户创建“cat”标签,您应该会看到它。一旦您的应用程序已上线,您应该会看到所有公开可用的“猫”标签。
关于已弃用的警告,它们是正常的,因为它们会告知使用“旧方式”的应用程序有关重大更改的信息。在您的情况下,它们可以被忽略。
关于json - 没有使用 instagram API 的分页信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33820651/