似乎是一个已知问题,但我没有找到解决方案。
当您的 facebook 应用程序尝试通过使用 JS 代码加载 fb:iframe 来执行某些 JS 调用时,Safari 会阻止此语句
Unsafe JavaScript attempt to access frame with URL from frame with URL . Domain, names and protocols must match
有办法解决吗?
最佳答案
您应该在 FB.init() 中指定 ChannelUrl 如果未设置,您可能会遇到其中一些问题。
FB.init({
appId : 'YOUR_APP_ID', // App ID
channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
还要确保您的服务器发送的是有效的 p3p header 。 http://www.hanselman.com/blog/TheImportanceOfP3PAndACompactPrivacyPolicy.aspx
关于javascript - Facebooker Connect 和 Safari 4,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1537850/