Hey All I'm developing a java desktop application. I have to search tweets by hashtags using twitter4j 3.0.5. I' have no problem with authentication and searching for tweets but there are some problems: I've tested my search results with topsy.com and i've seen that i get few tweets or no tweets. like #jobbingfest have about 500 tweets, but i found it empty... An intrest thing: the Twitter.search(query) docs say
Returns tweets that match a specified query. This method calls http://search.twitter.com/search.json
that api return a json like this
{"errors": [{"message": "The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview.", "code": 68}]}
I'm little bit confused... why i'm able to get tweets if that resource is no longer available?
I'm trying to understand the problem, but no way... i had to write here for help :p.
Thanks a lot! Licio.
ps. sorry but maybe my english isn't so good...
pps. to retrieve more than 100 tweets i use to do this is correct?
List<MioStatus> listaStatus = null;
try {
listaStatus = new ArrayList<MioStatus>();
result = twitter.search(query);
while(result.nextQuery() != null){
for (Status status : result.getTweets()) {
if(status.isRetweet()){
listaStatus.add(new MioStatus(status.getId(), true, "RT " + status.getRetweetedStatus().getText(), status.getUser(), status.getGeoLocation(), status.getRetweetCount(), status.getCreatedAt()));
}else{
listaStatus.add(new MioStatus(status.getId(), true, status.getText(), status.getUser(), status.getGeoLocation(), status.getRetweetCount(), status.getCreatedAt()));
}
}
result = twitter.search(result.nextQuery());
}