简体   繁体   中英

Facebook JS+FLASH SDK: Works on IE not in FF, Chrome

I have a facebook application developed with a mixture of the PHP, JS, and AS3 SDKs.

The application works perfectly on IE but it hangs on other browsers (FF,Chrome)

IN FF debug console I see an error message:

Empty string passed to getElementById(). swf is null (92 out of range 62)

This error happens just after calling:

Facebook.init( APP_ID, _handleInit );

The callback it's never fired.

Any ideas why?

Ok, I found the culprit.

The Facebook api needs a reference to the embedded SWF object. Since I was using SWFObject, I needed to pass two parameters: id for IE and name for Chrome/Mozilla Browsers.

Simple as that...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM