Skip to content

Instantly share code, notes, and snippets.

@luisparravicini
Created October 3, 2009 15:25
Show Gist options
  • Save luisparravicini/200690 to your computer and use it in GitHub Desktop.
Save luisparravicini/200690 to your computer and use it in GitHub Desktop.
Use Twitter api with JQuery to update news on a web page
/*
jquery twitter. By Luis Parravicini.
http://ktulu.com.ar/blog/2009/10/03/twitter-updates-with-jquery/
*/
(function($) {
$.twitter_updates = function(options) {
var defaults = { 'count': 10 }
var opts = $.extend(defaults, options)
var elem = this
$.getScript("http://twitter.com/javascripts/blogger.js")
var url = "http://twitter.com/statuses/user_timeline/" +
opts['username'] + ".json?callback=twitterCallback2&count=" +
opts['count']
$.getScript(url)
}
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment