Tuesday 20 September 2011

RSS feeds from Twitter Lists

For various reasons, I have been trying to get RSS Feeds from Twitter lists.  The main aim is to get views from a range of accounts onto our site in our own style.  The twitter-supplied gadget is all well and good, but it has its limitations.  Yesterday I discovered the holy grail - an Atom feed for twitter lists:

http://api.twitter.com/1/USERNAME/lists/LISTNAME/statuses.atom
eg http://api.twitter.com/1/libatcam/lists/cam-uni-libraries/statuses.atom

With the feed, using an Atom feed reader like this one, you can display the twitter statuses on your website, in whatever style you like.  Atom is subtly different from RSS, but if you can work with one, you are sure to get used to the other.

If you only want a feed from one account, the easiest way is to follow ThemeLab's tutorial to get the feed onto your site using only html and JavaScript.  However, if you want to do it the hard way, the RSS feed is:

http://api.twitter.com/1/statuses/user_timeline.rss?screen_name=TWITTERNAME
eg: http://api.twitter.com/1/statuses/user_timeline.rss?screen_name=theul

Then you will need to find yourself an RSS reader, like Magpie to get the tweets onto your site.

Have fun!