jQuery Twitter Embed (without OAuth)

Twitter are locking down their API (mid-May) to require OAuth authentication even for something as trivial as grabbing a user's recent tweets. Using some cross-domain jQuery magic via YQL, we can achieve the same thing by live-scraping the Twitter page from the visitor's browser - no server-side coding required.


Just grab the .zip file below, extract it and examine the example HTML file included. With a basic understanding of HTML/JavaScript you should be able to port this over to your own projects relatively easily.

For ease of use, there's a few quick settings you can tweak to customize the embed:

    // Settings
    username = 'adobebc'; // Twitter username
    target = '.tweets'; // Targeted element
    wrapper = 'li'; // Tags to wrap tweets with
    count = '5'; // Number of tweets to pull in, max. 20

* Disclaimer: This code was put together as a proof-of-concept, doesn't reflect best-practices and doesn't come with a warranty. Use at your own risk and feel free to alter/enhance or even convert to a proper jQuery plugin :)

Live Example (from @adobebc)