We’re developing a Flash site that integrates with Facebook heavily.
We’ve noticed a bug where, if a user is not logged into Facebook, and we try to log them in via Facebook.login in the AS3 classes provided by Adobe, the callback is invoked, but the parameters result:Object and fail:Object are BOTH null. If our user then tries to login again, it all works fine, returning the userid in result:Object if successful.
Is this a bug with Facebook itself? Has anyone seen this before? We’re sure this wasn’t happening about a week ago.
Facebook.login(onLogin, {perms:Config.FB_PERMISSIONS});
private function onLogin(result:Object, fail:Object):void {
// first time this is called after the popup closes returns
// result == null and fail == null
// second time around, results are as expected
}
Cheers,
Mark.
This is kinda dirty, but for me a timeout before calling login worked fine:
setTimeout(Facebook.login, 200, onLogin, {perms:Config.FB_PERMISSIONS});