java - (Twitter4J API) -- 检索不到超过 3235 条推文

标签 java twitter arraylist pagination twitter4j

我在使用 Twitter4J API 时遇到问题。我编写了我的程序以从用户帐户获取推文并且它做得很漂亮,直到达到 3235 条推文并中断。我不明白为什么它在达到这个特定数字时会停止,但我需要检索大约 9000~ 条推文,所以我不确定如何解决这个问题。我正在使用分页来检索它们。

感谢大家的帮助。

最佳答案

你不能。 来自documentation :

Clients may access a theoretical maximum of 3,200 statuses via the page and count parameters for the user_timeline REST API methods. Other timeline methods have a theoretical maximum of 800 statuses. Requests for more than the limit will result in a reply with a status code of 200 and an empty result in the format requested. Twitter still maintains a database of all the tweets sent by a user. However, to ensure performance, this limit is in place on the API calls.

因此,使用该方法您无法获得超过 3200 条推文,这就是您获得 3235 条的原因。

关于java - (Twitter4J API) -- 检索不到超过 3235 条推文,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35092880/

相关文章:

java - 使用哪一个 : HashMap and ConcurrentHashMap with Future values JAVA?

java - 使用包装类将字符串转换为整数数组列表

java - 如何对arraylist进行一系列排序操作(多种排序条件)

java - 如何动态地将多个值添加到HashMap中的单个键上?

java - 错误 : incompatible types: View cannot be converted to Button

java - 查找数组中 int 数字的最小值 (Java)

java - Gson 序列化 POJO 的 ArrayList 的问题

java - 在 Java 中使用 Twitter API(版本 1.1)发布状态并上传媒体

php - JSON 持久化/DOM

twitter - 在 Twitter 上共享带有查询字符串的 URL