August 2010
Intermediate to advanced
412 pages
8h 59m
English
The user session information is passed to Flash via flashvars parameters.
if (loaderInfo.parameters.fb_sig_added == undefined) {
// do nothing when the flash is compiled from Flash IDE
}
else if(loaderInfo.parameters.fb_sig_added == true){
var session:FacebookSessionUtil=new FacebookSessionUtil(loaderInfo.parameters.fb_sig_api_key,null,loaderInfo);
_fb=session.Facebook;
session.addEventListener(FacebookEvent.CONNECT,onConnect);
session.verifySession();
}else{
navigateToURL(new URLRequest("http://www.Facebook.com/login.php?api_key="+loaderInfo.parameters.fb_sig_api_key),"_top");
}
In our first example, we try to simply put the Flash virtual world inside the Facebook platform. Therefore, we leave the onConnect function ...
Read now
Unlock full access