Created
March 30, 2010 20:28
-
-
Save gregbell/349556 to your computer and use it in GitHub Desktop.
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
// Assuming jQuery is on the page, this will append the search tweets | |
// to an element with the id of 'twitter' | |
$.getJSON("http://search.twitter.com/search.json?q=adobe+sucks&callback=?", function(data){ | |
$.each(data.results, function(i, tweet){ | |
var tweetContent = '<div class="tweet">'; | |
tweetContent += '<p class="tweet-body">' + tweet.text + '</p>'; | |
tweetContent += '<p class="tweet-meta"><a href="http://twitter.com/' + tweet.from_user + '">' + tweet.from_user + '</a> at ' + tweet.created_at + '</p></div>'; | |
$('#twitter').append(tweetContent); | |
}); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment