views:

550

answers:

1

Hi,

I have a facebook app, which works with fbjs/flash/python. From yesterday I have been getting the following security error.

*** Security Sandbox Violation ***
SecurityDomain 'http://apps.facebook.com/feline-frenzy/bridgetest/' tried to access incompatible context 'http://static.ak.fbcdn.net/rsrc.php/z71HX/hash/4h1ls3l8.swf'

While the same code was working fine the other day. Upon inspection when the fbjs-bridge wants to send something to flash. The following is my code.

MY FBML :

<fb:fbjs_bridge/>
<div id="swfContainer"></div>
<script>
       var swf = document.createElement('fb:swf');
       swf.setId('my_swf_id');
       swf.setWidth('630');
       swf.setHeight('520');
       swf.setSWFSrc('http://media.varheroes.com/flash/bridge.swf'); 
       document.getElementById('swfContainer').appendChild(swf);
       document.getElementById('my_swf_id').callSWF('asMethod', 'one', 'two');
 </script>
 <script>
 <!--
      function flashtest(){
    document.getElementById('my_swf_id').callSWF('asMethod','fahim','akhter');
      }

  -->
  </script>

  <div id="crap">
        <a href="#" onclick="flashtest();">FLASH TEST</a><br/>
  </div> 

MY ACTIONSCRIPT CODE:

  var connection:LocalConnection = new LocalConnection();
   var connectionName:String =  LoaderInfo(this.root.loaderInfo).parameters.fb_fbjs_connection;

connection.allowDomain("apps.facebook.com", "apps.*.facebook.com");
    connection.client = {
        asMethod: function(paramOne:String, paramTwo:String) {
        // do something in the SWF
        var test:String = "DATA RECIEVED FROM JAVASCRIPT : "+paramOne+" "+paramTwo;
        callSetText("DATA RECIEVED FROM JAVASCRIPT");
    }
};
connection.connect(connectionName);

The error started happening yesterday like I said first it was working fine.

A: 

This is a bug that is affecting different applications and there is a bug already reported:

http://bugs.developers.facebook.com/show_bug.cgi?id=8562

So far I haven't personally found an alternative to this issue and it seems like all we can do is wait for them to make an update that will fix the issue.

Helmut Granda
still waiting sadly
Fahim Akhter