Twitter API Goes Geo

Raymond Yee
May. 02 2008, 01:29AM EDT

Thanks to some new API updates, one can now update the Location field in a Twitter user's profile using the Twitter API. As Ryan Sarver writes on his blog:

Location updates currently aren’t normalized or geocoded, but the ability to update it on the fly allows for some very cool possibilities when it comes to geo-based tweeting — especially in apps like Twinkle [an iPhone app] and Twittervision.

This update has now been reflected in the official API Documentation. For example, the following curl command will update your location (where USER and PASSWORD are your Twitter username and password):

curl -u USER:PASSWORD -d location="Berkeley, CA" 
http://twitter.com/account/update_location.json

Note that the location field is limited to 30 bytes when encoded in UTF-8. Hence, a long address such as "2855 Telegraph Ave., Berkeley, CA." will be truncated as "2855 Telegraph Ave., Berkeley,".

It will be interesting to see how this ability to programmatically change a user location will be used in practice. In addition to using this location field to display tweets on a Google map, Twittervision (profile) has been promoting a way to update one's location right within a tweet, by embedding a location such as L: Berkeley, CA. What will Twitter programmers and users use to update their location: the profile location, individual tweets, both, or neither?

Meanwhile the Twitter API continues to provide us with a steady stream of very useful and interesting mashups, with 46 Twitter apps listed here so far, including recent entries like the straightforward Twitterwatch that lets you see all the latest twitters as they are sent (full profile here).

Raymond Yee

Comments

Comments(7)

User HTML

  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.