graphapi_web_1_8_1.swc has a Facebook.init()
function that takes pretty much the same arguments as the FB.init()
JavaScript version. However, what I'm interested in setting is Facebook's hideFlashCallback parameter, via the "options"
argument passed into both Facebook.init()
and FB.init()
. The JavaScript SDK takes a value of type "Object"
as shown here:
http://developers.facebook.com/docs/reference/javascript/FB.init/
However, if I'm already calling graphapi_web_1_8_1.swc's Facebook.init()
from ActionScript, how can I pass in a JavaScript function as the hideFlashCallback?
I tried using ExternalInterface.call()
to call a "GetHideFlashCallback()"
JS function whose return value was the callback function as an object, but it comes back as null in ActionScript, even when the ActionScript variable was typed as "Object"
or "*"
.
My next test is to avoid calling graphapi_web_1_8_1.swc's Facebook.init()
and just do something like ExternalInterface.call("FB_init_proxy(args)")
which would just use Facebook's JavaScript SDK directly.
But is there a way to pass JavaScript functions back and forth with ActionScript as Object variables? If not, why? Is it a security concern?