Sunday, 6 January 2013

Extract full list of twitter favourites using LinqToTwitter

Extracting a full list of twitter favourites means querying the Twitter REST API.

I've been looking for a website or app that would allow me to do this easily but have not found anything yet. The only way to extract a full list of twitter favourites would be to go onto twitter (or access your twitter app) and page manually through all your favourites. As a quick and dirty solution I thought I would use LinqToTwitter against the Twitter REST API. LinqToTwitter is a third party Linq Provider for generating URLs against the Twitter REST API and additionally providing the client with Authentication features to allow for API access.

1. Create a Twitter account : www.twitter.com

2. Sign in with account at : dev.twitter.com.
- Select your login name and navigate to the menu option : My Applications
- Click 'Create a new application' button

This will take you through the steps to expose the Twitter API for your application.
-Make note of the Consumer Key and Consumer Secret provided for the code snippet below.

3. Download and run the console application. The console application will automatically open a browser window displaying a pin number from twitter, that you need to type into the console window. Once that's done the console application will continue to query twitter (page by page) and will generate a html page with your full list of twitter favourites.

My full list of twitter favourites.