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

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -