jQuery.tweet.js

A jQuery plugin that displays tweet(s) on your site, blog or wathever

View the Project on GitHub Frozzare/jquery.tweet.js

jQuery.tweet.js

A jQuery plugin that displays tweet(s) on your site, blog or wathever. It's easy to use. It will auto format the hash tag, links and name.

You can load as many accounts at the time you like with this plugin. It will give every account it load a unique id.

Note It will do one request to the Twitter API for each account.

Basic use

This will load one tweet (include rts) from the username you specified and show it.

$('.tweet').tweet('frozzare');

Example file

Options

Examples

List example

<ul class="tweets">Loading tweets</ul>

$('.tweets').tweet({
    screen_name: 'frozzare',
    list: true,
    count: 5
});

Example file

Avatar example

<ul class="tweets">Loading tweets</ul>

$('.tweet').tweet({
    screen_name: 'frozzare',
    avatar: true,
    list: true,
    count: 5
});

<p class="tweet"><img src="…"> tweet</p>

Example file

Tweet ID example

<p class="tweet">Loading tweets</p>

$('.tweet').tweet({ id: '194120642130477056' });

Or you can use the shortcut string

$('.tweet').tweet('id:194120642130477056');

Example file

Advanced

Each object created by $().tweet function will be stored in the window.tweets object.

$.tweet.get is used to load every tweet stored in window.tweets for a user. It will return an object or array depending on the amount of tweets.

$.tweet.get('frozzare')
// => Tweet

$.tweet.get('frozzare')
// => [Tweet, Tweet]

Build

npm install -g grunt
make

Changelog