php - getJson + Twitter -
im not programation i've been trying edit base code 1 ones display more 1 tweet dosen't work, me?
$.getjson("http://twitter.com/status/user_timeline/user.json?count=3&callback=?", function(data) { $("#tweet").html(data[0].text); });
thanks!
data
array. data[0]
accesses first tweet returned twitter. need iterate on array , append other tweets div.
$.getjson("http://twitter.com/status/user_timeline/user.json?count=3&callback=?", function(data) { $(data).each(function() { $("#twitter").append($(document.createelement('div')) .html(this.text).addclass('tweet')); } });
edit: changed selector target #twitter
div , add tweet
class each tweet.
Comments
Post a Comment