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.?