是否有可能获得超过100条推文? [英] Is it possible to get more than 100 tweets?
本文介绍了是否有可能获得超过100条推文?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以使用Twitter4j API获取超过100条推文?
如果是这样,任何人都可以指出这样做的方法吗?
Is it possible to get more than 100 tweets using the Twitter4j API?
If so can anyone point out the way to do so??
推荐答案
需要查看您的代码以提供特定于您的案例的代码示例,但您可以通过<$ c执行此操作$ c> since_id 或 max_id
。
Would need to see your code to provide a code example specific to your case, but you can do this through since_id
or max_id
.
此信息适用于Twitter API。
This information is for the Twitter API.
- 在您刚查询的集合中找到最低 ID
- 执行相同的查询,并将
max_id
选项设置为您刚找到的ID。
- find the the lowest id in the set that you just retrieved with your query
- perform the same query with the
max_id
option set to the id you just found.
要获取下一个 100条推文:
To get the next 100 tweets:
- 找到 ID
- 使用
since_id
选项集执行相同的查询到你刚找到的id。
- find the the highest id in the set that you just retrieved with your query
- perform the same query with the
since_id
option set to the id you just found.
在Twitter4j中,你的查询
对象有两个代表上述API选项的字段: sinceId
和 maxId
。
In Twitter4j, your Query
object has two fields that represent the above API options: sinceId
and maxId
.
这篇关于是否有可能获得超过100条推文?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文