I want to get the count of tweets mentions a specific user. I try searching with query "@username" but I have only 15 results. Any idea?
*(Also I have not problem to use twitter Api)
ConfigurationBuilder cb = new ConfigurationBuilder();
cb.setOAuthConsumerKey("XXXXX");
cb.setOAuthConsumerSecret("XXXXXX");
cb.setOAuthAccessToken("XXXXX");
cb.setOAuthAccessTokenSecret("XXXXX");
// gets Twitter instance with default credentials
Twitter twitter = new TwitterFactory(cb.build()).getInstance();
Query query = new Query("@firefox");
QueryResult search = twitter.search(query);
System.out.println("count"+search.getCount());
Use twitter's streaming api and track the keywords or mentions.
(Uses twitter4j).
You can count the number of times a keyword is mentioned from the time you start runnung this program. You cannot count past tweets. You have rate limitations in searching past tweets.