An attempt to authorize on a client site and an attempt to run inside the canvas. If I access directly my site http://mysite.com/ , everything works. If I try to run through canvas https://apps.facebook.com/myapp , it starts, but getLoginStatus does not start at all.
var curLoc = window.location; FB.init({ appId: 'xxxxxxxxxxxxxxx', // App ID channelUrl: curLoc.protocol + "//" + curLoc.hostname + ":" + curLoc.port + "/channel.html", cookie: true, // enable cookies to allow the server to access the session status: true, oauth: true, xfbml: true }); FB.getLoginStatus(function (response) { if (response.status === 'connected') { smloader.gameVariables.smUserid = response.authResponse.userID; facebook.isLoaded = true; } else { facebook.authUser(); } }, true);
Sign in if necessary.
function facebook.authUser() { FB.login(function (response) { if (response.authResponse) { smloader.gameVariables.smUserid = response.authResponse.userID; facebook.isLoaded = true; } else { facebook.authUser(); } }, { scope: 'email,publish_actions' });
}
Once Facebook.isLoaded is correct, I know that we are logged in and ready to continue. but he never goes directly to the canvas page.
I'm in sandbox mode, currently running via http, not https, since I don't
Any ideas?
source share