I tried to add Facebook credential to my website. But except name and Facebook ID, other details are not returned.
include_once("includes/access_login.php");
include_once("facebook/facebook.php");
define('YOUR_APP_ID', '16604785137509701');
$facebook = new Facebook(array(
'appId' => '16607854137509701',
'secret' => '5cfdea08254bb6637d064924a73e5c508',
));
$userId = $facebook->getUser();
echo "FB User Id : " . $userId;
$userInfo = $facebook->api('/me');
echo "
";
print_r($userInfo);
echo "
";
?>
enter image description here
I have used these things. I am getting
FB User Id : 902204443331431759
Array
(
[name] => sradha
[id] => 902204443331431759
)
but not the other details. Suggest me