facebook getloginurl authentication permissions

| | August 6, 2015

seems having updated to the latest version of the facebook php sdk the following code is not working-

$loginUrl   =   $facebook->getLoginUrl(array(
           'canvas'    => 0,
           'fbconnect' => 1,
           'req_perms' => 'publish_stream,status_update,offline_access'
           ));

the user is not being asked for the extended permissions- some digging has come up with fb now requesting you add these permissions in the facbeook developer app- under Authenticated Referrals- i added them in and still nothing

anyone any ideas- without being able to post when a user completes an action my app is useless and am out of a job

update-

the new sdk requires different params-

$loginUrl   =   $facebook->getLoginUrl(array('scope' => 'publish_stream,status_update,offline_access'));

2 Responses to “facebook getloginurl authentication permissions”

  1. $loginUrl   =   $facebook->getLoginUrl(array(
               'canvas'    => 0,
               'fbconnect' => 1,
               'scope' => 'publish_stream,status_update,offline_access'
               ));
    

    req_perms key changed to scope

  2. Yes, you are correct, the new oauth2 requires you to define the requested permissions in the scope parameter.

Leave a Reply