簡體   English   中英

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

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

我正在使用Twitter4J庫在Twitter Android應用程序上工作。 Streaming API工作正常。 但搜索API沒有返回所有推文,其間的一些推文被跳過,而在搜索結果中找不到。

我正在查詢query("from:handle") ,我查看了相應句柄的Twitter頁面,而不是頁面上的所有推文都出現在搜索結果中。 大多數帶圖像的推文都被遺漏了。

以下是我正在使用的代碼。

    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());
    }

任何人都遇到與twitter4j類似的問題? 或者Twitter搜索API有任何限制嗎?

這里

重要的是要知道Search API關注的是相關性而非完整性 這意味着搜索結果中可能缺少某些推文和用戶。 如果要匹配完整性,則應考慮使用Streaming API

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM