2009-11-10 42 views
0

以下代码适用于FF和Chrome,但IE6不会呈现连接按钮。简单fbml fb:登录按钮不在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> 
+0

我假设你'替换为您的实际API密钥API_KEY'? – 2009-11-10 04:54:00

+0

ofcourse ..如上所述,按钮出现在FF和Chrome中没有问题。 这适用于我的应用程序的其余部分以及所有fbml标记在FF中正常工作并呈现良好状态,但在IE6中无法呈现。 上面的代码是最基本的例子,它仍然不会在IE6中呈现。 – Mark 2009-11-10 05:00:15

+0

你是怎么测试这个的?我在网上阅读,即使真正的IE6工作,IETester无法正确呈现它。 – Bemmu 2009-11-10 09:01:26

回答

0

似乎问题是与傲游浏览器,而不是直接转发IE6。

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>