Facebook 简单fbml fb:login按钮未在ie6中呈现

Facebook 简单fbml fb:login按钮未在ie6中呈现,facebook,fbml,Facebook,Fbml,以下代码适用于FF和Chrome,但IE6不呈现connect按钮 我错过了什么 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbm

以下代码适用于FF和Chrome,但IE6不呈现connect按钮

我错过了什么

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0     Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<title></title>
</head>
<body>
<fb:login-button>Login button</fb:login-button>
<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
<script type="text/javascript">  
FB_RequireFeatures(["XFBML"], function(){ 
    FB.Facebook.init("API_KEY", "/xd_receiver.htm"); 
}); 
</script> 
</body>
</html>

登录按钮
FB_RequireFeatures([“XFBML”],function(){
init(“API_KEY”,“/xd_receiver.htm”);
}); 

问题似乎出在Maxthon浏览器上,而不是直接的IE6。

将javascript替换为以下内容:

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1&appId=261463080590982";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

(功能(d、s、id){
var js,fjs=d.getElementsByTagName[0];
if(d.getElementById(id))返回;
js=d.createElement;js.id=id;
js.src=“//connect.facebook.net/en_GB/all.js#xfbml=1&appId=261463080590982”;
fjs.parentNode.insertBefore(js,fjs);
}(文档“脚本”、“facebook jssdk”);

我假设您用实际的API密钥替换了
API\u密钥
。。如前所述,按钮在FF和Chrome中显示时没有问题。这也适用于我的应用程序的其余部分,所有fbml标记在FF中都可以正常工作和渲染,但在IE6中却不行。上面的代码是最基本的示例,仍然不会在IE6中呈现。您是如何测试它的?我在网上读到,IETester无法正确呈现它,即使真正的IE6可以工作。我也有同样的问题,IE6中的FB_RequireFeatures似乎有问题。我还没有找到其他任何东西,但是IE6确实在函数存在时抛出Javascript错误“Object Expected”,而在函数不存在时则不存在该错误。我无法进一步调试IE6。如果您碰巧在非80端口上进行测试,也会出现问题,因为JavaScript SDK使用window.location.hostname而不是window.location.host。