Facebook Connect showPermissionDialog callback fires before user can even see the dialog
Posted
by Chris Hiester
on Stack Overflow
See other posts from Stack Overflow
or by Chris Hiester
Published on 2010-02-07T17:47:13Z
Indexed on
2010/03/20
12:11 UTC
Read the original article
Hit count: 450
I'm doing a Facebook Connect integration for a site and when the user logs in, I need to ask for some permissions so I use FB.Connect.showPermissionDialog. I use its callback to see if permissions were granted. If they are granted, I want to submit the form. Here's what my code looks like:
$("#form3").live("submit", function() {
FB.Connect.showPermissionDialog('email, offline_access', function(perms) {
if (!perms) {
location.href="http://www.mysite.com/logout/";
return false;
} else {
save_session();
}
});
});
The problem is that the form submits before the user can even see the permission dialog. Has anyone seen this before?
© Stack Overflow or respective owner