Skip to content

Instantly share code, notes, and snippets.

@acostajohn
Created August 19, 2011 21:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acostajohn/1158053 to your computer and use it in GitHub Desktop.
Save acostajohn/1158053 to your computer and use it in GitHub Desktop.
Fetching last tweets
var script = document.createElement('script');
var username = 'John_Acosta';
var count = 5;
var callback = function(tweet){
console.log(tweet);
};
script.src = 'http://www.twitter.com/statuses/user_timeline/'+ username +'.json?count='+ count +'&callback=callback';
document.getElementsByTagName('head')[0].appendChild( script );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment