i'm using new facebook php sdk v4 and I want to retrieve full list of friends Code:
try {
$user_friends = (new FacebookRequest(
$session, 'GET', '/me/friends'
))->execute()->getGraphObject(GraphUser::className());
echo '<pre>';
print_r($user_friends);
} catch(FacebookRequestException $e) {
echo "Exception occured, code: " . $e->getCode();
echo " with message: " . $e->getMessage();
}
But the result is:
Facebook\GraphUser Object
(
[backingData:protected] => Array
(
)
)
Login url parameters:
$loginUrl = $helper->getLoginUrl(array( 'publish_actions', 'user_friends', 'public_profile' ) );
Is this feature is disabled? There is another way to get a list of friends?
Thank you in advance