Php json twitter数组列表-检索实际tweet
因此,我最近发布了20条tweet-JSON_decode(): 但是,我如何实际检索文本和URL呢?它的嵌套数组Php json twitter数组列表-检索实际tweet,php,json,twitter,Php,Json,Twitter,因此,我最近发布了20条tweet-JSON_decode(): 但是,我如何实际检索文本和URL呢?它的嵌套数组 有人能帮忙吗?你在用亚伯拉罕推特吗 试试这个: [user] => Array ( [id] => 192994 [id_str] => 192994
有人能帮忙吗?你在用亚伯拉罕推特吗 试试这个:
[user] => Array
(
[id] => 192994
[id_str] => 192994
[name] => Stupido
[screen_name] => Stupido
[location] =>
[description] =>I'm who I'm
[url] => http://t.co/xehevCed
[entities] => Array
(
[url] => Array
(
[urls] => Array
(
[0] => Array
(
[url] => http://t.co/xehevCed
$parameters=array('screen\u name'=>'twitter'/*您的屏幕名*/,'result\u type'=>'最近','count'=>'20'/*您的限额*/);
$content=$connection->get(“状态/用户时间线”,$parameters);
对于($i=0;$i<20/*您的限额*/;++$i){
echo$content[$i]->text.$content[$i]->user->url.“
”;
}
[user] => Array
(
[id] => 192994
[id_str] => 192994
[name] => Stupido
[screen_name] => Stupido
[location] =>
[description] =>I'm who I'm
[url] => http://t.co/xehevCed
[entities] => Array
(
[url] => Array
(
[urls] => Array
(
[0] => Array
(
[url] => http://t.co/xehevCed
$parameters = array('screen_name' => 'twitter' /* your screen name */, 'result_type' => 'recent', 'count' => '20' /* your limit */ );
$content = $connection->get("statuses/user_timeline", $parameters);
for($i = 0; $i < 20 /* your limit */; ++$i) {
echo $content[$i]->text . $content[$i]->user->url . "<hr />";
}