我们在IE8中收到权限被拒绝的错误。它发生在FB.init之后。我们已经尝试过channelUrl修复。我们已经将作为第一个标记放在了body之后。我们已经在脚本和channel.html中尝试了document.domain。我们已经尝试过FB.UIServer.setActiveNode解决方法。它在IE9,FF,Chrome和Safari上运行良好。
<div id="fb-root"></div>
<script src="//connect.facebook.net/en_US/all.js"></script>
<script type="text/javascript">
var myUserId;
document.domain = 'XXXX.XXXX.com';
window.fbAsyncInit = function() {
FB.init({ appId: 'XXXXXXXXX',
status: true,`enter code here`
cookie: true,
xfbml: true,
channelUrl: 'http://XXX.XXXX.com/channel.html'
});
FB.UIServer.setActiveNode = function(a, b) { FB.UIServer._active[a.id] = b; } // IE hack to correct FB bug我在facebook- for页面上的一个标签应用程序的facebook-iframe中的IE8中得到了一个权限被拒绝的错误。有什么办法解决这个问题吗?
发布于 2011-12-14 20:51:58
这对我很有效:
FB.init({
appId: 'xxxxx',
appSecret: 'xxxxxxxxx',
status: true
cookie: true
});
// this code solves the issue
FB.UIServer.setLoadedNode = function (a, b) {
FB.UIServer._loadedNodes[a.id] = b;
};如图所示,http://ikorolchuk.blogspot.com/2011/09/facebook-javascript-sdk-security-error.html?showComment=1323866805727#c7681567069563597438
发布于 2011-09-24 05:21:25
我建议附加调试器,并准确地显示错误发生的位置。如果这与Facebook的代理有关,这可能是Facebook的一个临时问题。
有几个建议(上面没有提到):
1/尝试将FBML添加到html标记:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" xml:lang="en">2/如果要访问的测试服务器可能被视为intranet站点(通常是同一子网),请尝试禁用兼容模式选项。
发布于 2011-10-01 02:08:45
这可能是因为您重定向到HTTP页面,而您当前的iframe是https。
iframe的协议可以是https,这可能是因为内部重定向,即使Facebook页面是http。
https://stackoverflow.com/questions/7534855
复制相似问题