GitHub : https://github.com/philipbeel/Tweetable
Demo : http://plugins.theodin.co.uk/tweetable/demo/
Website : http://theodin.co.uk
Email : [email protected]
Twitter : @philipbeel
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.
Please note that IE is no longer supported by this plugin.
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'});
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();
}
});
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
- Added caching for improved performance
- Made code more moduler
- Added suppot for jQuery 1.8 getJSON promise interface
- Depreciated IE support
- Added loading message support
- Changed endpoint to use getmytweets.co.uk
- Added Qunit test coverage
- Refactored plugin architecture
- Added override for plugin defaults object
- Added Qunit test coverage
- Added timeago plugin support
- Optimized variable declarations