4
votes

I am working on the Twitter Android Application with Twitter4J library. Streaming API's are working fine. 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.

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. 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? Or is there any limitations with twitter search API.?

1

1 Answers

1
votes

From here:

it’s important to know that the Search API is focused on relevance and not completeness. 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.