2013-07-31 64 views
0
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-的Twitter列表 - 獲得實際的tweet

有人可以幫忙嗎?

回答

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 />"; 

}