2012-04-30 33 views
0

我寫了這個代碼:如何獲得好友/下面的ID?

$twitterObj->setToken($_SESSION['ot'], $_SESSION['ots']); 
$twitterFriends=$twitterObj->get_friendsIds(array('screen_name' => $_SESSION['username'])); 
$twitterFriends->response; 
echo $twitterFriends->responseText; 
foreach($twitterFriends as $friend) { echo $friend->id; } 

但我得到這個:

{"errors":[{"code":37,"message":"Not authorized to use this endpoint"}]} 

爲什麼? 我如何獲得好友/下面的ID?

回答

1

根據this post,您可以使用舊的twitter API URL。你有沒有嘗試更新你使用的Twitter庫?