When users are trying to log in to my app the dialog box, asking for permission is not apearing. My code is:
$facebook = new Facebook(array(
'appId' => 'myappid',
'secret' => 'mysecret'
));
if($facebook->getUser() == 0){
$loginUrl = $facebook->getLoginUrl(array(
'scope' => 'email'
));
else{
$api = $facebook->api('me');
echo "Hi " . $api[name];
$user_profile = $facebook->api('me', array('fields' => 'email'));
.....
}
I have also tried to use this:
$loginUrl = $facebook->getLoginUrl(array(
'req_perms' => 'publish_stream, read_friendlists'
));
But again users are not asked for permissions to allow it. I guess that this is probably due to some settings configuration...