I don't find the twitter web interface practical to use, and in any case it's separated from my message center. So I would like to get my twitter timeline directed to thunderbird somehow. This should be easy, but is far from it, mainly due to various authentication schemes. Note the solution presented here has a large default latency, but should never miss tweets. I rarely use twitter as a realtime feed (which is available through other means if needed), and in general I try to minimize realtime sources (interruptions).

I could have more easily written a script to be run periodically on one of my always connected servers, but instead as a learning exercise tried to use existing services available to anyone on any platform. In summary my twitter timeline now uses the following path to thunderbird.

Service NameFunctionLimits
Twitter collate timeline default=20, max=200
Supertweet oauth --> simple auth same as twitter
Feedburner simple auth --> no auth mimics source up to 512KB
Google Reader caching/archiving saves all (no facility to delete)
Google Reader API remote access to feed default=20, max=1000
Thunderbird reading/archiving none

There are two twitter behaviours that preclude direct connection from thunderbird. The first is that twitter restricts access to your home timeline using oauth, which thunderbird doesn't support. The second is that twitter limits tweets one can receive to the last 200. Since thunderbird is generally run on an intermittently connected client, one must retrieve those last 200 tweets periodically.

So how do we solve the above 2 issues?

1. OAuth to RSS

Ideally I would like to convert to a public RSS feed, as there is nothing sensitive in my twitter timeline. There are a couple of services to provide this.

I tried twitter2rss.heroku.com which should provide this service, but unfortunately it just errored out. Then I tried twitter2rss.com which provides the same service and works. However it just reads the default 20 items that twitter returns with no way to specify 200 that twitter supports. This would definitely result in lost tweets given the attributes of the caching services described below.

So I used supertweet.net which does allow one to collect the last 200 tweets. The caveat is that the resultant feed is protected with basic authentication.

2. Caching

I considered using feedburner (feedburner supports basic auth with URLs of the form http://twitteruser:supertweetpassword@api.supertweet.net/1/statuses/home_timeline.rss) and feedburner caches 512KB of data which is around 750 tweets by my calculations which would be fine for normal use for me. Unfortunately I'll lose some tweets if I don't refresh after a weeks holidays for example, but more problematically, feedburner tries to mimic the original feed and so will remove old items from the feed on each update (done every 30 mins).

Google Reader

So then I considered using google reader as it caches posts forever, and also you can access feeds remotely using URLs of the form: http://www.google.com/reader/atom/feed/http://whatever.com/feedurl?r=n&n=100 However google reader doesn't seem to support the basic auth at supertweet.net So we can instead subscribe to the feedburner feed in google reader to make my google remote feed available. Note I think this google API is limited to 1000 items, but the feedburner one is limited to 750, so this should not be a significant issue. Another caveat I noticed with google reader is that it only auto updates every 6 hours or so, and perhaps also triggered when logging in, or clicking the "refresh" button. It seems that in 2007 the frequency was every 3 hours for single subscriber feeds, or every hour otherwise. The biggest caveat though, is that one needs to use "google authentication" to access the google reader feed.

Thunderbird ClientLogin

I thought I might have to use a separate ClientLogin script to bridge between thunderbird and google reader, but recognising that my browser could access the feed without explicit authentication, suggested that thunderbird could do this directly too. Adding a gmail a/c to thunderbird (requiring app specific passwords if you've 2 factor authentication enabled on your google a/c) did not allow access to the feed. However adding a google reader browser tab using g-hub lite did work. Note the authentication details are stored and available even after restarting without first loading the reader tab. I suspect the more general thunderbrowse addon would work too.

Alternatives

I did consider using google reader to read my tweets, but that doesn't allow one to delete (hide) entries, which I do for most tweets I receive. Also I like to have a central copy of all my messages.

If one has a dedicated server it's probably simpler to use something like feedjack or even a cron script that downloads and merges the items. One could also use twitter's streaming (push) API, on a server too.

I also noticed Google's feed API with supports "includeHistoricalEntries" option, which could be useful for applications like this.

As a final note, things are much simpler without authentication. If your tweets (as opposed to your timeline) are public for example, then one can subscribe to them directly.

[Update: Sep 2012, Twitter have announced they're deprecating RSS, and will remove it in 6 months, so this will have to be adjusted.]

[Update: Feb 21 2012, supertweet no longer have the RSS V1 API available, as twitter are deprecating it soon. I tried to get thunderbird to interact with twitter directly through the TweeQuilla addon. This works quite well and provides better integration like sending tweets from thunderbird, and better field presentation like original author etc. However one can't delete tweets and so it's not useful for me at least since I only keep 1% of my timeline. Note I'm currently using thunderbird 13 and and I notice as of thunderbird 15 twitter integration is directly supported through Instant messaging and chat support. So I added Thunderbird 17 to my system through rpms.famillecollet.com. However this isn't useful to me either, since you can't delete messages etc. TweeQuilla was actually better integration here, since it treated tweets as messages, though it doesn't seem to be actively maintained :( So perhaps it's best to write a python script to convert the supertweet json to rss. This can cache an rss file with say 1000 entries.]
© Aug 17 2011