views:

28

answers:

0

When a user has logged in in javascript I'm trying to use that session in my actionscript-3 code. On connect my e(FacebookEvent).error.reason returns null though. Here is my code.

stage.loaderInfo.parameters["fb_sig_session_key"] = getFlashVars().session_key; stage.loaderInfo.parameters["fb_sig_ss"] = getFlashVars().secret; stage.loaderInfo.parameters["fb_sig_api_key"] = API_KEY; stage.loaderInfo.parameters["fb_sig_user"] = getFlashVars().uid; _FBSessionUtil = new FacebookSessionUtil(API_KEY, null, stage.loaderInfo); _FBSessionUtil.addEventListener(FacebookEvent.CONNECT, onConnect); _facebook = _FBSessionUtil.facebook; _FBSessionUtil.verifySession();

private function onConnect(e:FacebookEvent):void { if ( !e.success ) { output.text = "Connect Error: " + e.error.reason; // outputs "Connect Error: null" } }