简体   繁体   English

Twitter4J android查询搜索不返回所有推文

[英]Twitter4J android query search does not return all tweets

I am working on the Twitter Android Application with Twitter4J library. 我正在使用Twitter4J库在Twitter Android应用程序上工作。 Streaming API's are working fine. Streaming API工作正常。 But the search API is not returning all the tweets, some of the tweets in between are skipped and not found in the search results. 但搜索API没有返回所有推文,其间的一些推文被跳过,而在搜索结果中找不到。

I am querying with the query("from:handle") , I checked with the Twitter page of respective handle, not all the tweets on page are present in the search result. 我正在查询query("from:handle") ,我查看了相应句柄的Twitter页面,而不是页面上的所有推文都出现在搜索结果中。 Most of the tweets with images are missed. 大多数带图像的推文都被遗漏了。

Below is the code which i am using. 以下是我正在使用的代码。

    String handle = "ndtv";
    Query query = new Query("from:"+handle);
    query.setCount(100); // Limit of resultset
    QueryResult result = twitter.search(query);
    System.out.println("Count : " + result.getTweets().size()) ;
    for (Tweet tweet : result.getTweets()) {
        System.out.println("text : " + tweet.getText());
    }

Anyone faced similar issues with twitter4j? 任何人都遇到与twitter4j类似的问题? Or is there any limitations with twitter search API.? 或者Twitter搜索API有任何限制吗?

From here : 这里

it's important to know that the Search API is focused on relevance and not completeness . 重要的是要知道Search API关注的是相关性而非完整性 This means that some Tweets and users may be missing from search results. 这意味着搜索结果中可能缺少某些推文和用户。 If you want to match for completeness you should consider using a Streaming API instead. 如果要匹配完整性,则应考虑使用Streaming API

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM