A nimble facebook resolution?

I am having trouble understanding how fb: prompt-permission works. I may get a link when a user clicks the fb: login button - either a user already registered with Facebook, either in our application, or through our website. On the other hand, without clicking the login button, the link or permission dialog is not displayed if the user is already logged in from facebook to our page.

Does this mean that the prompt is only available when the user clicks the login button ... is there a way to avoid this?

+2


source to share


2 answers


Use this:

<fb:login-button perms="publish_stream, email">Login and Install</fb:login-button>

      



Source: http://developers.facebook.com/docs/guides/web

+3


source


Use standard login button in FB Connect, add onlogin () call

<fb:login-button onlogin="OnRequestPermission();"></fb:login-button>

      

and use this function to manually invoke the access request dialog:



function OnRequestPermission(){
    var myPermissions = "publish_stream"; // permissions your app needs

  FB.Connect.showPermissionDialog(myPermissions , function(perms) {
    if (!perms)
    {
        // handles if the user rejects the request for permissions. 
        // This is a good place to log off from Facebook connect
    }
    else
    {
        // finish up here if the user has accepted permission request
    }
  });
}

      

Source: http://forum.developers.facebook.com/viewtopic.php?pid=190797

+2


source







All Articles