Thomas Mango

Experimenting with #newtwitter

When Twitter recently launched their new site, #newtwitter, I was delighted to learn it was actually an API client. As someone who builds web applications and works on APIs myself, it was inspirational to see this all done with HTML and Javascript. Needless to say, when my account gained access to #newtwitter, I fired up my Web Inspector and started digging around with the console – you can learn a lot with the console’s tab completion.

After experimenting for a bit, I whipped up some quick Javascript that appends a ”?” link to each trend. When clicking the ”?” link, a standard #newtwitter dialog opens up and an explanation of the trend, fetched from What The Trend, is displayed.

One interesting thing to remember when working with the trends list on #newtwitter is that trends update every once in a while. Simply executing this script once won’t do the trick. I decided to let jQuery’s live function handle that issue.

Check out the source below if you’re interested in how I did it: