我想在 java 中使用 twitter4j lib 提取本周的所有推文。我试着像下面那样做
try {
Query query = new Query("since:2013-04-01&until:2013-04-08");
QueryResult result;
do {
result = twitter.search(query);
List<Status> tweets = result.getTweets();
for (Status tweet : tweets) {
System.out.println("@" + tweet.getUser().getScreenName() + " - " + tweet.getText());
}
} while ((query = result.nextQuery()) != null);
System.exit(0);
但是,我最终收到一条错误消息
403:The request is understood, but it has been refused. An accompanying error message will explain why. This code is used when requests are being denied due to update limits (https://support.twitter.com/articles/15364-about-twitter-limits-update-api-dm-and-following).
message - Missing or invalid url parameter
code - 195
那么,我如何通过将日期作为参数来获取推文?谢谢