Created
October 3, 2009 15:25
-
-
Save luisparravicini/200690 to your computer and use it in GitHub Desktop.
Use Twitter api with JQuery to update news on a web page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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