简单的fbml fb:登录按钮不在ie6中渲染

时间:2009-11-10 04:48:14

标签: facebook fbml

以下代码适用于FF和Chrome,但IE6不会呈现连接按钮。

我在这里缺少什么?

<!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>

2 个答案:

答案 0 :(得分:0)

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

答案 1 :(得分:0)

将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>