How do I ask for facebook permissions in PHP? can you please give me an example?
thanks.
Assuming you have the user's access_token(which you can get via $facebook->getAccessToken() after you've logged a user in:
try{
$permissions = $facebook->api('/me/permissions', 'get', array('access_token'=>$access_token));
print_r($permissions, true);
if(empty($permissions['data'][0]['installed'])){
echo 'User has not installed the application.';
}
if(empty($permissions['data'][0]['publish_stream'])){
echo 'User does not have the publish_stream permission.';
}
}catch(Exception $e){
echo $e->getMessage();
}