twibble API

twibble API 200×150
As you might know twitter is going to provide geolocation information in the near future. That’s great news and makes the geolocation support in the twibble mobile client even more useful. This also means the geolocation api we have been providing for some time will no longer be necessary in order to pull location data out of the twitter stream. You’ll get something like

"geo":
{
"type":"Point",
"coordinates":[37.78029, -122.39697]
}

directly from the twitter stream. Let’s see how geolocation will change the twitter world!
Below the previous information on our api. Please do not rely on the availabilty of our api.

twibble provides an API. You can subscribe to geocoded twitter timelines that you can feed into your blog. This should work fairly well if you have a GPS enabled device like the iPhone or Nokia N95. twibble understands locations sent by twitteriffic (iPhone) and twibble mobile, and manual entered locations in the twitter user profile. As an example, this URI displays the last location of twitter user twibble (hey, that’s us ;) .

The feeds are in kml and georss format. The API allows you to display the locations of yourself and your twitter friends in Google Earth, Google Maps, or any other georss/kml aware application. You can also include the feeds into your own application or blog. The format of the twibble output data is very similar to the output data of the twitter API. Basically, the twibble API adds some additional geo elements to the standard twitter output but lets the basic structure unchanged. If you want to play with it below are some examples.

Google Earth:

In Google Earth click on Add->Network Link and enter the following URI:
http://api.twibble.de/statuses/user_timeline.kml. If prompted for a password enter your twitter credentials. This should display your location(s). If you want to watch the locations of your friends add this URI:

http://api.twibble.de/statuses/friends_timeline.kml

Of course, you can add more than just one network link. Google Earth can also auto update your view say every 5 minutes. This is how it looks like in Google Earth with a GPS postion sent by a Nokia N95:

twibble in Google Earth

Google Maps:

In the example above http://api.twibble.de/statuses/user_timeline/twibble.kml?count=1 returns the last location of twitter user twibble. Just replace twibble with your screen name. Note the count parameter whichs tells the api just to return the last status of twibble. Both kml (suffix .kml) and GeoRSS (suffix .rss or .georss) should work. Note, this will only display public twitter profiles because Google maps currently does not support authentication of overlay maps.

Embeddable Google Maps:

Follow the instructions for Google maps above and generate an iframe using “Link to this page” in the top right-hand corner. You will get a HTML snippet you can insert in your web page.

Use the data in your own application

As you’ve seen in the examples above the twibble API works very similar to the twitter API. Currently you can get gecoded timelines (cf. twitter Status Methods as described in the twitter API):

friends_timeline (you need to authenticate)

URL: http://api.twibble.de/statuses/friends_timeline.format
Formats: xml, kml, georss

Parameters:

  • id. Optional. Specifies the ID or screen name of the user for whom to return the friends_timeline. Ex: http://twitter.com/statuses/friends_timeline/12345.xml or http://twitter.com/statuses/friends_timeline/bob.json.
  • since. Optional. Narrows the returned results to just those statuses created after the specified HTTP-formatted date.

and similar also the user_timeline:

URL: http://api.twibble.de/statuses/user_timeline.format
Formats: xml, kml, georss

The output is probably best explored using a command line tool like curl. E.g. try

curl http://api.twibble.de/thilo/statuses/user_timeline/twibble.kml or

curl -u http://api.twibble.de/thilo/statuses/friends_timeline.xml. You will notice the extra location element.

33 responses so far ↓

1 Rich Wagner // May 24, 2008 at 05:01

Is it possible to display just the location of the last status of a user rather than a complete timeline? For example, I am getting ready to leave on a trip and would like to have an embedded Google Map on my web site that shows my current location (as specified by my last tweet). Is this possible?

Thanks, Rich

2 thilo // May 28, 2008 at 18:03

Rich, that should be possible. If I understand you correctly you want some sort of kml file that has only one entry with your last position, right?

3 Rich Wagner // May 29, 2008 at 03:30

Yes, that is correct.

Also, with your existing API call, I am trying to call:
http://api.twibble.de/statuses/user_timeline/richwagner.kml

I am getting the following error:

Line 19: contains syntax errors

However, I was actually getting the same tweets/locations to work fine this weekend.

4 thilo // May 29, 2008 at 07:36

Rich, it seems your user_timeline is currently empty:
http://api.twibble.de/statuses/user_timeline/richwagner.json
gives an empty list. This one works:
http://api.twibble.de/statuses/user_timeline/twibble.kml
But I agree that shouldn’t result in an error. I’ll have a look at it!

5 Rich Wagner // May 29, 2008 at 15:58

Do you know why the timeline would be empty? See my latest tweets below—note that I do have L: location info in each.

richwagner We made it to the Hampton Inn in Blythe. It is a wicked 106 degrees!!!! Great day of riding. We’ll blog tonight! (L:BLYTHE,CA) 08:08 AM May 25, 2008 from twhirl

richwagner Passing Buzzards Peak. Very hot! Approaching 104 degrees. We are riding strong, however. (L:33.14278,-114.86389) 08:04 AM May 25, 2008 from twhirl

richwagner Unbelievable scenery this morning. Sand dunes in all directions. Great video blog stuff! (L:RUTHVEN,CA) 07:58 AM May 25, 2008 from twhirl

richwagner Leaving Brawley before the sun comes up. :( 4:30am is not a time in which any human should be on a bike. (L:BRAWLEY,CA) 07:56 AM May 25, 2008 from twhirl

6 Rich Wagner // Jun 11, 2008 at 17:07

How long do locations stay “current” in the user timeline? IOW, I had a user timeline that originally mapped out exactly as desired on the day the entries were entered, but now my user time returns empty.

7 thilo // Jun 12, 2008 at 16:48

Rich, you should now see all of your tweets up to 20 in the user timeline (before it was all tweets within the last 48 hours). However, the friends_timeline doesn’t work any more (without authentication) because twitter has changed the api. Pls see http://www.twibble.de/2008/06/06/twibble-weekend-news/ Thanks for reporting!

8 Nate // Jul 25, 2008 at 03:57

Hey, I really like the .georss capabilities of the twibble api! Thank you for distributing it and providing the service!

Is there a way to make it only grab the latest tweet? As in with the Twitter API’s “?count=1″ This ability would be very helpful.

Thanks again!

9 thilo // Aug 6, 2008 at 19:36

@Nate here you go: ‘http://api.twibble.de/statuses/user_timeline.georss?count=1′ should give you the latest geocoded tweet of the authenticated user. The count parameter also works for the other formats (kml, xml, json) and timelines (friends_timeline and complete_timeline). In addition the twibble-API understands iPhone-Positions sent by Twitterrific :)

10 Alex // Nov 30, 2008 at 22:34

Great API. IS there a way to get a geocoded search feed rather than a user feed? i.e. a KML’d version of something like http://search.twitter.com/search?q=twibble ?

11 35 Mobile applications for Twitter | honeytech // Dec 6, 2008 at 10:17

[...] Twibble – Its a Twitter client application for the Nokia N95. [...]

12 aziz // Dec 7, 2008 at 12:19

think you for this action

13 Tim Clark // Dec 9, 2008 at 15:31

This is great. How do you geocode the place names in a tweet (e.g. L:Hamburg:)? Is it a Google geocoding application? I’m curious about the level of accuracy. Thanks!

14 Rick Kempen // Jan 25, 2009 at 13:55

Great feature, the automatic GPS tagging from Nokia 95 8B. But: it twibbles only a readable location for the Twibble desktop and API, right? Non-Twibble readers need to copy and paste the location into f.e. Google Earth. Why doesn’t Twibble automatically make a link to a map site???

15 thilo // Jan 26, 2009 at 21:32

@Tim searches are geocoded using the Google geocoder and Yahoo as a fallback.

16 thilo // Jan 26, 2009 at 21:44

@Rick Basically there are 2 options: A L:: string or a link to a maps app (e.g. Google maps). The former is more general as other applications/mash-ups can parse it and do funny things with it (e.g. this one). You’re right, the latter makes it easy to show your position to other people. Maybe (power) twitter or identi.ca will eventually recognize the L: tag

17 Henry // Feb 12, 2009 at 11:14

Does this work with identica.ca or just twitter? I imagine there would be a problem with the same name on both services.

18 Anyone fool around with the Twitter API? - TalkPHP // Feb 19, 2009 at 21:17

[...] this cool API: http://www.twibble.de/twibble-api/ __________________ SkiLeases.com Need a Blog or Website? – [...]

19 Rafael // Mar 3, 2009 at 21:10

Hi, is the google maps database down? I have used it before and i had no problem at all..but when on the last week i have this error message when I search for a location:

“File not found at http://api.twibble.de/statu….

not even the link for the tiwbble location (at the beggining of this page) seems to be working.

20 thilo // Mar 15, 2009 at 22:10

@Henry you’re right, as for now it’s twitter only

21 thilo // Mar 15, 2009 at 22:11

@Rafael works here. If I enter http://api.twibble.de/statuses/user_timeline/twibble.kml?count=1 in the search field of Google maps I see the last location of twibble.

22 bignellymarko // May 7, 2009 at 04:43

how do i get the location on my blackberry twibble to work?

23 Andrei // Jun 3, 2009 at 20:44

Is twibble still working ? It seems like it is not parsing properly my twitter entries. Are you working on something at the moment ?

24 Andrei // Jun 3, 2009 at 22:44

now it seems to be working again , strange

25 Um é pouco, dois é bom… Três aplicativos Java para seu Twitter/mobile! | Twitcast - O Podcast do Twitter Brasileiro // Jul 30, 2009 at 16:56

[...] seguro de todos, tendo o sistema ssl ativo e também aceitando o sistema de posicionamento de seus tweets/fotos. (caso você tenha GPS em seu [...]

26 Forex // Aug 6, 2009 at 05:35

Can I use your api for twitterfox?

27 tim.constable // Aug 20, 2009 at 12:17

hi i typed my User id in the right place, the green light comes up but no sub folders, i type my friends id and it works..???

28 Twitter to add geo-tagging | Twimmer.com :: Twitter News // Aug 21, 2009 at 20:41

[...] mentioned in his post, third party developers like Germany’s Twibble have already produced geo-location services for Twitter. They relied on information pulled from the location details in users’ profiles or from [...]

29 Nick Cornaglia // Sep 5, 2009 at 05:02

Just tried the API with Google Maps. Works Great! Thanks.
http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=http:%2F%2Fapi.twibble.de%2Fstatuses%2Fuser_timeline%2Ftwibble.kml%3Fcount%3D1&ie=UTF8&z=7

30 צייץ לי מפה. « E.T. Official Blog // Sep 27, 2009 at 22:32

[...] הצייצנים הישראלית. לכן, התחלתי להשתעשע עם API שונים. ל Twibble, יצרני אפליקציות טוויטר למחשב ולסלולרי, יש API שמזכיר [...]

31 Salih // Oct 8, 2009 at 12:14

hello,

i can’t see my location via google maps an twibble.
i do everything and replace twibble in the example http://api.twibble.de/statuses/user_timeline/twibble.kml?count=1

what is wrong?

32 thilo // Oct 8, 2009 at 17:54

Hi Salih, you did everything right! Currently the api has been disabled since twitter itself is going to add geolocation to the tweet stream (see above).

33 How to get Twitter on your desktop and mobile « Kathryn Corrick // Dec 7, 2009 at 16:16

[...] Twitterfon (Windows) http://twitterfon.net/ Twibble (Nokia, BB, SonyEricsson) http://www.twibble.de/twibble-api/ Possibly related posts: (automatically generated)Twitter’s quiet problem15 June [...]

Leave a Comment


fresh from the blog!

twibble mobile 1.0.3
posted: October 11, 2009 at 1:32 pm
Changes in twibble mobile
posted: September 30, 2009 at 7:55 pm
twibble desktop 0.5.3
posted: August 28, 2009 at 1:02 pm
twitter announces Location API
posted: August 21, 2009 at 9:16 am

twibble screenshots

www.flickr.com

follow twibble at http://twitter.com