Hello
I getting current user friends list by php api of facebook.
can you suggest me what is missing.LINK
<?php
require 'facebook.php';
$facebook = new Facebook(array(
'appId' => 'removed',
'secret' => 'removed',
));
if($facebook->getUser() == 0){
$login = $facebook->getLoginUrl();
echo "<a href= '$login'>Login with Facebook</a>";
}
else{
$user_profile = $facebook->api('/me');
$user_friends = $facebook->api('/me/friends');
$access_token = $facebook->getAccessToken();
echo "<pre>";
print_r($user_profile);
echo "</pre>";
echo "<br/>";
echo "<pre>";
print_r($user_friends); //Given NULL Value
echo "</pre>";
}
?>