A Beginner's Guide to Twitter Auth with OAUTH
Nov 1, 2010

For this week's Tech Talk Friday, I presented a live demo of authenticating with Twitter using OAUTH. The presentation covered a number of basic steps and source code to get yourself up and running with a working copy in no time.

Below is a quick outline of exactly what is included and accomplished in the downloadable demo:

  • Twitter authentication with OAUTH.

  • A wrapper library containing generic methods for handling authentication, callbacks, and a few API calls.

  • Documentation and comments in all source files.

  • A fully functional page of API call examples with AJAX, including:

    • The ability to tweet from the web application after logging in.

    • Generation of a user list timeline. AJAX handling on the page will poll for updates every minute using the _idstr return value to pass as the _sinceid param in the subsequent poll.

    • The ability to follow a user directly from the timeline.

  • A links page referencing important Twitter documentation pages regarding API integration.

The polling functionality is a good demonstration of using Twitter's new _sinceid parameter to grab newer results. Proper usage of _idstr field is also used. This basically means that there won't be any signed integer problems with the new lengthy tweet ids generated by Snowflake.

Go ahead and check out the live demo or download the source code now.