Facebook's hideFlashCallback not called

362 views Asked by At

I'm working on an Facebook app in flash using starling (3D graphics). So my HTML page need to be in wmode="direct".

I implement the solution given on Facebook https://developers.facebook.com/blog/post/637/

I put a log into the callback and this log never appear, all Facebook dialog are shown under my flash app. So I don't think the callback is called.

Here my test code for the callback. Do I miss something ? Thank you

EDIT : In my app the backend is called and then redirect to the frontend. I found out that when the domain is different between my back an my front the callback is not launch but when it is the same one it is called. Do someone know why ?

function test(info)
{
console.debug("teste");
}

function fbInit()
{

  window.fbAsyncInit = function()
  {
    FB.init({
     appId: '${facebook_api_code}',
     status: true,
     cookie: true,
     xfbml: true,
     oauth: true,
    frictionlessRequests: true,
    hideFlashCallback : test
    });

    FB.Canvas.setSize();
    window.isFacebookAPIInitialized = true;

    if ((flashObject = getFlashMovie('${application}')) != undefined && flashObject.handleJavascriptFacebookAPIInitialized != undefined)
  flashObject.handleJavascriptFacebookAPIInitialized();
 };

 // Load the SDK asynchronously
 (function(d, s, id){
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) {return;}
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all"+".js";
  fjs.parentNode.insertBefore(js, fjs);
  }(document, 'script', 'facebook-jssdk'));
};
1

There are 1 answers

0
Marc Loeb On

I faced the same issue, in my case the FB.init was called twice, once from Javascript and the other time from inside Flash, causing that the flashHideCallback was lost.