javascript - How do I grab the objects from php Twitter API -
so can tweets using twitter oauth can echo tweets using foreach. want grab data php , bring them page.
index.php contains json array of tweets.
then in page2.php have code below display specific objects using $.ajax index.php
$.ajax({ datatype: "html", url: 'index.php', success:function(data){ //$('#tweets').html(data['text']); $.each(data, function () { list += '<p>'+ this.text +'</p>'; }); $('#tweets').html(list); }
});
but when try specify particular object grab text no results. use
data['text']
or
data->text
from observing current code, you're using jquery method send data php file.
i 99% sure following should work:
$_get['list'];
Comments
Post a Comment