I am trying to make a small facebook application with php & facebook PHP API. I need to give a permissions to post status, etc. But it is doesn't work. Here is my code:
<?php
require './src/facebook.php';
$facebook = new Facebook(array(
'appId' => '###',
'secret' => '###',
));
$user = $facebook->getUser();
if ($user) {
if ($user) {
$logoutUrl = $facebook->getLogoutUrl();
echo "<a href='$logoutUrl'>Logout</a>";
} else {
$loginUrl = $facebook->getLoginUrl(array(
'req_perms' => 'publish_stream,read_friendlists,email'
));
echo "<a href='$loginUrl'>Login with Facebook</a>";
}
?>
When i click on Login url do not get permissions (publish_stream,read_friendlists,email). I see only "Logging in will not add this app's activity to Facebook."