I have written this code:
$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; }
But I get this:
{"errors":[{"code":37,"message":"Not authorized to use this endpoint"}]}
Why ?
How can I get the friend/following ids ?
According to this post you could be using old twitter API URL’s. Have you tried updating the twitter library your using?