json - 没有使用 instagram API 的分页信息

标签 json url pagination instagram instagram-api

我用过这个URL获取近期媒体关于具体tag喜欢 cats使用 Instagram API . URL是这样的:

https://api.instagram.com/v1/tags/cats/media/recent?access_token=*****

不幸的是,没有数据,我得到了以下 warningpagination :
{"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_idmin_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/

相关文章:

java - 我应该将序列化对象放在 Java 程序中的什么位置?

url - 如何在 Emacs 缓冲区中同时打开多个 URL?

javascript - 未捕获的语法错误 : Unexpected token< VM3419:1

javascript - 将 JSON 解析为 HTML 嵌套列表

c# - 如何将 RestSharp 响应解析为一个类?

javascript - 如何防止 jQuery $.ajax 在请求中的查询字符串中添加前导 & 符号?

javascript - 如何在jsp url中隐藏用户id和其他参数?

android - 如何在滚动(分页)期间将新数组列表连接到现有数组列表并显示给 recyclerview android

angularjs - Angular ui.grid 分页与分页

java - MS SQL Server 2008 中的 JPA/Hibernate 分页错误映射到对象