Benjamin Simon
Benjamin Simon

Reputation: 474

Display app Canvas page before authorization popup

I'm developping a facebook canvas app with the new Auth Dialog : https://apps.facebook.com/evaway_us/

My problem is that users always have to authorize the application before seeing anything and I have a terrible conversion rate.

How can I make my canvas app display a page prior to any user action requiring authorization ?

Like this : http://apps.facebook.com/tradablebits/

Upvotes: 0

Views: 501

Answers (2)

Benjamin Simon
Benjamin Simon

Reputation: 474

I finally found the solution :

I had "Authenticated Referrals" activated in the new Auth Dialog Menu. As soon as I unchecked this option, I was able to render my canvas page before the authorization popup.

Upvotes: 2

DMCS
DMCS

Reputation: 31870

Using Javascript SDK, use the FB.getLoginStatus() function to determine what page the user should see. See http://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus/ for more information on how to use that function.

FB.getLoginStatus(function(response) {
  if (response.status === 'connected') {
    // the user is logged in and connected to your
    // app, and response.authResponse supplies
    // the user's ID, a valid access token, a signed
    // request, and the time the access token 
    // and signed request each expire
    var uid = response.authResponse.userID;
    var accessToken = response.authResponse.accessToken;
  } else if (response.status === 'not_authorized') {
    // the user is logged in to Facebook, 
    //but not connected to the app
  } else {
    // the user isn't even logged in to Facebook.
  }
 });

Upvotes: 0

Related Questions