Array
(
[statuses] => Array
(
[0] => Array
(
[metadata] => Array
(
[result_type] => recent
[iso_language_code] => en
)
[created_at] => Wed Jul 30 17:15:35 +0000 2013
[id] => 3626225823751905
[id_str] => 3626225875190528
[text] =>Where are you?
[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
所以,我最近有20条推文 - JSON_decode(): 但是,我怎样才能真正检索文本和URL?它的嵌套数组。
有人能帮忙吗?
答案 0 :(得分:0)
你在使用亚伯拉罕Twitteroauth吗?
试试这个:
$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 />";
}