phpfacebookoauthpermissionsfacebook-fbml

Directing users to facebook login page without asking for permissions


I'm trying to redirect users to the facebook login page then back to my app without the Log In to app page displaying. Is this possible?

I've looked into the "next" parameter which is automatically generated by the PHP-SDK but cannot seem to change it.

Is there anyway to do what I'm looking for? I want to make sure users are logged in in order to check to see if they have authed my app but do not want them to if they are not already.

Thanks for any help!


Solution

  • No, i don't think it is possible to modify the next parameter. The only place where i saw the next parameter(in the PHP SDK) is in the getLogoutUrl() function, as seen in the source of the base_facebook.php. And that parameter defines which url to go, after logout.

    For getLoginUrl() in the base_facebook.php file, we have

     return $this->getUrl(
      'www',
      'dialog/oauth',
      array_merge(array(
                    'client_id' => $this->getAppId(),
                    'redirect_uri' => $currentUrl, // possibly overwritten
                    'state' => $this->state),
                  $params));
    

    as the last line in the function, which obviously means that the oauth-dialog will be shown, no matter what you try.

    If your app is not on Facebook, then you can go for <fb:login-button>Login with Facebook</fb:login-button> in Javascript, and subsequently follow the example from this url. You'll see there that it's not possible to remove that dialog entirely, even if you don't ask for any permissions.

    The Javascript SDK's FB.login() method will also bring up the auth dialog.
    Hope this helps.