How do I ask for facebook permissions in PHP? -


how ask facebook permissions in php? can please give me example?

thanks.

assuming have user's access_token(which can via $facebook->getaccesstoken() after you've logged 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 application.';     }     if(empty($permissions['data'][0]['publish_stream'])){         echo 'user not have publish_stream permission.';     } }catch(exception $e){     echo $e->getmessage(); } 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -