I'm using the GoViral ANE from milkman games. The extension seems to connect to facebook properly. It connects with my profile. I can see my profile picture and I get a prompt asking if I would like to connect fb with my profile. No errors throughout this process. I can see my friends list when I choose to invite friends. When I send them the invite, they never receive a notification. It also doesn't show pages to "like". When I try to show a fan page/like page, fb loads and says data not found. In the fb settings I have single sign on set to yes. I have deep linkage set to yes as well. I do not have both platforms set up on facebook though. I only have the android platform set up. I dont know if this could be an issue or not. But as I said, It's connecting with my profile and showing my friends list when trying to invite. It's just not actually doing anything afterward. I'm receiving no errors.
if( GoViral.isSupported() ){
GoViral.create();
}else{
trace( "GoViral only works on mobile!" );
return;
}
if( GoViral.goViral.isFacebookSupported() ){
//replace 000000 with your facebook app id!
GoViral.goViral.initFacebook( "my fb id","" );
}
btn_connectFacebook.addEventListener( MouseEvent.CLICK, connectToFacebook );
GoViral.goViral.addEventListener( G VFacebookEvent.FB_LOGGED_IN,successfulLogIn );
//GoViral.goViral.addEventListener( GVFacebookEvent.FB_LOGIN_CANCELED,onFacebookEvent );
GoViral.goViral.addEventListener( GVFacebookEvent.FB_LOGIN_FAILED,logInFailed );
public function connectToFacebook(e:MouseEvent){
if(!GoViral.goViral.isFacebookAuthenticated()){
// show a connect with Facebook prompt.
// this method takes a comma separated list of facebook READ permissions as a first
// parameter. You should have at least one read permission.
// you can refer to the facebook documentation at
// http://developers.facebook.com/docs/authentication/permissions/ to determine which
// permissions your app requires.
GoViral.goViral.authenticateWithFacebook( "public_profile");
}
}
public function successfulLogIn( e:GVFacebookEvent ){
//No longer need to connect to fb
hasConnectedToFb = true;
maintenanceSO.data.need2Connect2FB = false;
connectedToFb();
GoViral.goViral.presentFacebookPageOrProfile("last digits of my fb fan page url");
GoViral.goViral.showFacebookRequestDialog(
"Play my game",
"Play this game with me!").addDialogListener(function(e:GVFacebookEvent):void {
switch(e.type)
{
case GVFacebookEvent.FB_DIALOG_CANCELED:
//log("The Invite Dialog was canceled.");
MovieClip( root ).gotoAndStop( "didntWork" );
break;
case GVFacebookEvent.FB_DIALOG_FAILED:
MovieClip( root ).gotoAndStop( "didntWork" );
break;
case GVFacebookEvent.FB_DIALOG_FINISHED:
//log("Successfully invited friends dialog:"+e.jsonData);
if(e.data.to)
{
MovieClip( root ).gotoAndStop( "didWork" );
//log("Invited these people :"+e.data.to.join(","));
}
break;
}
});
}