The old Twitter API is no longer available and therefore all the existing RSS feeds of Twitter have stopped working as well. With API v1.1, Twitter has 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, users’ favorites or even Twitter Lists – in your RSS Reader. There is however any easy workaround based on Google Scripts.
Twitter RSS Feeds
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 some simple Google Scripts. To give you an example, here are some RSS feeds that are generated using the new Twitter API v1.1 and are served from the Google cloud.
- Timeline of @labnol [Twitter Timeline]
- Favorites of @labnol [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 API 1.1
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 new 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
- Click here to copy the Twitter RSS script into your Google Drive. Put the Twitter Consumer key and Secret in line # 28 and 30.
- 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 Google Script with attribution.