We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOther Libraries › twitter4j geoCode() question
Page Index Toggle Pages: 1
twitter4j geoCode() question (Read 961 times)
twitter4j geoCode() question
May 18th, 2010, 6:05pm
 
I'm using twitter4j to collect tweets from Twitter based on location, specifically using the geoCode() method which uses lat/lon measurements to localize the returned tweets. The geoCode() method works fine: If i search "weather" limited to San Diego's lat/lon, the tweets are about it being sunny, if i search somewhere else, its rainy, etc. However, if I then do a getGeoLocation() for each individual tweet, it returns null almost every time. SO, that means, whatever info the geoCode() is using must come from somewhere else.

According to the documentation @  
http://twitter4j.org/en/javadoc/index.html  ,

the geoCode() method:
"returns tweets by users located within a given radius of the given latitude/longitude, where the user's location is taken from their Twitter profile"

But I don't understand this. Users type in their location themselves, so how could twitter 4j take that data and connect it to the lat/lon measurements it requires?

What I really want to know is where does the geoCode() method get the data it needs from a  tweet to determine if it is near the specified location? And is it possible to access that info within any tweet, regardless of if a geoCode was set in the first place?

Page Index Toggle Pages: 1