Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FB.login() not asking for given permissions

The login is working, but it only asks for basic permissions and no alert is triggering when canceling or finishing the dialog.

 window.fbAsyncInit = function() {

    // init the FB JS SDK
    FB.init({
      appId      : 'XXX', // App ID from the App Dashboard
      channelUrl : 'XXX', // Channel File for x-domain communication
      cookie     : true, // set sessions cookies to allow your server to access the session?
      xfbml      : true,  // parse XFBML tags on this page?
      frictionlessRequests: true,
      oauth: true
    });

     FB.login(function(response) {
       if (response.authResponse) {
         alert("ok");
       } else {
        alert("canceled");
       }
     }, {scope:'publish_actions,publish_stream'});

  };
like image 416
Chris Avatar asked Mar 31 '13 15:03

Chris


People also ask

How do I grant permissions on Facebook?

From your Page, click Manage, then click Page Access. Next to People with task access, click Add New. Click Next, type the name or email address of the person you want to give task access to the Page, then click their name. Click to select the features you want this person to manage, then click Give Access.


1 Answers

Are you using fb:login-button? If so, have you tried adding the permissions there instead of in FB.login()? So it would look something like:

<fb:login-button scope="publish_actions,publish_stream"></fb:login-button>
like image 189
CMH Avatar answered Nov 07 '22 19:11

CMH