在Chrome和IE上的Facebook Canvas应用程序中使用上传"Uncaught Call to StartUpload failed"

Mat*_*teh 15 javascript flash jquery facebook uploadify

我已经在Facebook上的画布应用程序中实现了Uploadify jQuery插件的标准Flash版本.

上传在Firefox中完美运行.但是当我尝试在Chrome或IE中启动上传时,它会在控制台中显示此消息:

Uncaught Call to StartUpload failed

对于那些不熟悉Facebook画布应用程序的人来说,它是在Facebook的iframe中运行的PHP页面,可能会导致这个问题 - 尽管它在框架外运行时也不起作用.


我也在Chrome控制台中收到这些错误:

Unsafe JavaScript attempt to access frame with URL https://apps.facebook.com/[app name]/[page name]/ from frame with URL https://[app domain]/[page path]. The frame being accessed set 'document.domain' to 'facebook.com', but the frame requesting access did not. Both must set 'document.domain' to the same value to allow access.


有什么想法可能会发生什么?我已经尝试为Flash 设置crossdomain.xml但没有成功.

ben*_*123 1

根据另一个线程将 document.domain 更改为完全其他域,有可能将域更改为当前域的后缀。

如果“[应用程序域]”可以更改,您可以尝试将[应用程序域]更改为“ https://[应用程序域].apps.facebook.com/”,并在加载iframe时从iframe页面运行javascript

document.domain = 'facebook.com';
Run Code Online (Sandbox Code Playgroud)

但不确定添加另一个域名作为后缀是否存在任何问题(合法吗?)。