Skip to content
This repository has been archived by the owner on Mar 10, 2018. It is now read-only.

philipbeel/Tweetable

Repository files navigation

Deprecation notice

This plugin was based on a now depricated version of the twitter API and is no longer maintained. This code doesn't work anymore. The original readme is below:

Tweetable - A jQuery plugin for displaying twitter feeds

Website : http://theodin.co.uk
Twitter : @philipbeel

Description

Tweetable is a lightweight jQuery plugin that enables you to display your twitter feed on your site quickly and easily. More than just displaying the feeds you can highlight @replys as well as links being dynamically generated for ease of use.

IE Usage

Please note that IE is no longer supported by this plugin.

Usage

Call in the jQuery framework and jquery.tweetable.js in your webpage

<script type="text/javascript" src="jquery.tweetable.js"></script>

Create an element on your page that you want to call your twitter feed into.

<div id="tweets"></div>

Initiate tweetable on your selected element, pass in the twitter username.

$('#tweets').tweetable({username: 'philipbeel'});

TimeAgo plugin support

Tweetable also supports timeago. for displaying how long ago a tweet was posted. This can be achieved like so:

$('#tweets').tweetable({
	html5: true,
	onComplete:function($ul){
		$('time').timeago();
	}
});

Plugin parameters

limit: {Integer},           	// Number of tweets to show
username: {String},     		// @username tweets to display
time: {Boolean},            	// Display date
retweets: {Boolean},        	// Discount retweets false
replies: {Boolean},         	// Filter out @replies if true
failed: {String}				// Text to display when API returns no results
rotate: {Boolean}				// Displays only one tweet at a time
speed: {Integer}		     	// Speed in milliseconds to display each tweet if rotating
append: {String}				// Appended position
loading: {String}				// Loading tweets text
HTML5: {Boolean}				// Confirm if HTML5 is supported (timeago support)
cacheInMilliseconds {Integer}	// Time to keep the most recent tweets in cache before requesting new ones
onComplete: {Object}			// Function callback after event triggered

Changelog

2.1

  • Added caching for improved performance
  • Made code more moduler

2.0

  • Added suppot for jQuery 1.8 getJSON promise interface
  • Depreciated IE support
  • Added loading message support

1.7.1

  • Changed endpoint to use getmytweets.co.uk

1.7.0

  • Added Qunit test coverage
  • Refactored plugin architecture
  • Added override for plugin defaults object

1.6.0

  • Added Qunit test coverage
  • Added timeago plugin support
  • Optimized variable declarations