- Code: Select all
// this code is copy pasted from the Player.IO seedlings code sample and I have used the same for our facebook game
private function _ConnectToFacebook() : void {
var parameters:Object = LoaderInfo(this.root.loaderInfo).parameters;
//If played on facebook
if(parameters.fb_access_token){
// The code doesn't reach this point. I see that the game in facebook shows me the right variable values }
else {
// this works fine
}
}
I am unable to get this working on facebook. The if condition for the fb_access_token is not evaluating to true. Am I doing anything while while accessing FlashVars.
The above function exists in my Document class.
Actually, I tried passing my own custom flash var by editing index.html and that also doesn't work.
{% extends 'master.html' %}
{% block content %}
{% swf src='swf/abc.swf' width=760 height=500 id='game' myFlashVar = 'testflashvar' %}
{% end %}