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

Popular posts from this blog

objective c - Newbie question -multiple parameters -

iphone - Using nested NSDictionary with Picker -

php - accessing mysql using different server to which db connection data is located -