3
votes

I am using twitter4j java library to make a twitter API search for given keywords. The rearch works fine, but all the tweets returned have the geo field set to null. I have taken a look to the twitter developers documentation and all te results there, have geo null.

Here is my java code:

TwitterFactory twitterFactory = new TwitterFactory();
Twitter twitter = twitterFactory.getInstance();
Query query = new Query("query");
query.setRpp(10);
QueryResult result = twitter.search(query);

I list all the tweets but none of them has geo code.

Is there any way I can get the geo location of the tweet /user?

1
Well are you sure that those results have a geo parameter set? It's an optional field that may or may not be there.Devin M
I will try to see that, but I have made many queries, and no geo location found.Alina Danila
Well try finding a user that is tagging the posts with a geolocation. You could always make an account and post a tagged tweet.Devin M
Indeed, posts that were not geotagged will not return anything. They are not automatically geotagged.Tudor
I have searched for my own tweets, adding geolocation, I find the tweet, but still no geolocation.Alina Danila

1 Answers

2
votes

There seems to be a problem at Twitter causing this behaviour.

Although some search queries work for me and return some coordinates (1st of Feb 2012).

Unfortunately what I can only suggest is waiting until they solve the problem or have a look at the discussion attached to that issue.