2009-11-10 41 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>