Display Twitter Statuses via JavaScript

Need to add information from Twitter to a website? I needed to recently, for a project I’m working on, but I wanted to do more than Twitter’s widgets provided. Searching for a viable solution, I discovered Remy Sharp’s Twitter.js.

The script, once included in your page, allows you to use the getTwitters() function to display tweets the way you want them. The statuses are loaded dynamically after the page is done loading, cutting a few seconds off your page load time.

The function has numerous options, as well as a templating variables you can use to display the statuses the way you want. You can show just your tweets (and specify the quantity), or you include your friends’ tweets too. One of my favorite features is the ability to display avatars along with the statuses.

At 3.2k, the script won’t add much to your pages’ loading times either.