Twitter is permanently retiring the Twitter API v1.0 sometime later this month and, to the end user, what it means is that all the existing Atom and RSS feeds of Twitter will stop working once the old API is turned off. With API v1.1, Twitter has completely switched from XML to JSON format and the other big change is that all requests to the Twitter API must now be authenticated with OAuth.
In simple English, you can no longer subscribe to any of the Twitter streams – be it search results, timelines of users, their favorites or even Twitter Lists – in your RSS Reader.
That said, there is any easy workaround.
Twitter RSS Feeds – Demo
What we really need is some sort of a parsing program sitting between Twitter and our RSS Reader. The parser would fetch updates from Twitter at regular intervals and convert them from JSON to RSS which we can then subscribe in our favorite RSS Reader.
This can be easily accomplished with a simple Google Script but before getting your hands dirty, try any of the following RSS feeds. These feeds use the new Twitter API v1.1 and are served from the Google cloud.
- Timeline of @mattcutts [Twitter Timeline]
- Favorites of @ginatrapani [Twitter User Favorites]
- Twitter List curated by @Scobleizer [Twitter List RSS]
- Search results for labnol.org [Twitter Search RSS]
How to Create RSS Feeds for Twitter
Step 1: Setup a Dummy Twitter App
Since the Twitter API now requires authentication for all requests, we will have to create a new Twitter App that our Google Script will use to communicate with the Twitter API.
- Go to dev.twitter.com, sign-in with your Twitter account and create a Twitter app. Give your app any name, description, website (any URL) and put https://spreadsheets.google.com/macros/ in the callback URL field. Click Submit.
- Once the Twitter app has been created, make a note of your Consumer Key and Consumer Secret Key.
Step 2: Configure your Google Script
- Go to script.google.com and choose File->Make a Copy to copy that script into your Google Drive. Put the Twitter Consumer key and Secret in line # 24 and 26.
- Go to File -> Manage Version and choose Save new version.
- Go to Publish -> Deploy as Web App and choose Anyone, even anonymous under Who has Access. Click the Deploy button.
Step 3: Deploy the Twitter RSS Feed generator
- Now that you have deployed the Google script, go to Run -> Start and grant the necessary permissions.
- Choose Run -> Start again and the script will require access to Twitter. Grant access and you’ll get an email with links to some sample RSS feeds for Twitter.
That’s it. You can now generate custom RSS feeds for any Twitter Timeline, List or Search Results by simply change the value of “q” parameter in the feed’s URL. As always, you are free to use, modify and distribute the source code with attribution.