28 April 2011

mapping people I'm following on twitter: (KML, java, geonames.org)

I wrote a java tool to map the people I'm following on twitter. This tool invokes the twitter API to fetch the profiles of my contacts and it uses the geonames web services to guess the geolocation of the places.

The source code is available on github at https://github.com/lindenb/jsandbox/blob/master/src/sandbox/TwitterToKML.java.
the build.xml is here.

Compilation

ant twitterkml
#get your twitter-id at "http://api.twitter.com/1/users/show.xml?screen_name=<your-twitter-username>"
java -jar dist/twitterkml.jar -g <geonames-id> -o result.kml <twitter-numeric-id>
##WAIT. I don't use the OAuth API, so my program waits until the 'rate limit' is enabled again.

'following'



'followers'



That's it,
Pierre

1 comment:

thegrandplan said...

This is very interesting post! I want to ask, If I have know the tweetuser names (e.g. screenname), may be a list of names, then I want to draw it to map like you do, how could I use your code for that ? Thank you!