I need more results in my search


#1

Im developing in java with the twitter4j library

Im using:
QueryResult qr=twitter.search(new Query(“BarackObama”));

but it gives me just 15 tweets.

How can I get a bigger amount of tweets?

i tried twitter.search(new Query(“BarackObama count:50”));
but it returns empty


#2

The count parameter can be set in the query object:

Something like this:

Query q = new Query("BarackObama");
q.resultType(ResultType.recent); //Most Recent Tweets
q.setCount(100); // Max 100 Results Per Page

#3

Very good, thanks.

I was wondering if I can get more than 100 tweets, lets say with more than 1 page.

But I don’t see how to access or ask for different pages. Is it possible?


#4

The QueryResult object has a hasNext() and nextQuery() methods you can use to loop through results to get more tweets


#5

You have also an option to specify “Recent”, “Popular” or “Mixed”

I developed such application to Download Twitter Search Results using the same java library, and I can download up to 1000 tweets from the search.