FB.ui apprequest 对话框出现问题
我正在尝试从 Iframe 应用程序发送应用程序邀请。我像这样打开对话框。
function sendRequestToOneRecipient(user_id) {
FB.ui({method: 'apprequests',
message: 'message',
to: user_id,
display: 'popup'
}, requestCallback(user_id));
}
当对话框打开时,我收到大量“不安全的 JavaScript 尝试从具有 URL 的框架访问具有 URL 的框架”错误消息。发送和取消按钮只会使对话框变为空白,但不会关闭并且不起作用。
我不知道它是否相关,但是当在 Chrome 中加载 JS SDK 时,我得到“无法读取未定义的属性'cb'”,并且 Firefox 说“b 未定义”。我不再有任何对旧的 FeatureLoader.js 的引用。
I am trying to send application invites from an Iframe application. I open the dialog like this.
function sendRequestToOneRecipient(user_id) {
FB.ui({method: 'apprequests',
message: 'message',
to: user_id,
display: 'popup'
}, requestCallback(user_id));
}
When the dialog opens I get a ton of "Unsafe JavaScript attempt to access frame with URL from frame with URL" error messages. The send and cancel buttons just make the dialog go blank, but not close and it doesn't work.
I don't know if it's related or not, but when loading the JS SDK in Chrome I get "Cannot read property 'cb' of undefined" and Firefox says "b is undefined". I do not have any references to the old FeatureLoader.js anymore.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这就是我用来发送 apprequest 的代码,并且在 Chrome 或 Firefox 上从未遇到过问题...:
他们最近在这里发布了更多示例:http://developers.facebook.com/docs/reference/dialogs/requests/
希望有帮助
Thats the code I use to send apprequest, and never had problem either with Chrome or Firefox ... :s
They post recently more examples recently here : http://developers.facebook.com/docs/reference/dialogs/requests/
Hope that helps
我发现了问题。包含的 Javascript 文件与 Facebook 的 Javascript 冲突。我不太确定究竟是什么发生了冲突,但它是 2005 年的 JSON 库。值得庆幸的是,它没有被使用,所以我只是将其删除。这是文件的版权信息。
I found the problem. There was an included Javascript file that was conflicting with Facebook's Javascript. I'm not really sure exactly what was conflicting, but it was a JSON library from 2005. Thankfully, it's not being used so I just removed it. This is the copyright information on the file.