我正在使用社交插件在我的網站中嵌入一個像按鈕。我開始使用像按鈕文檔(http://developers.facebook.com/docs/reference/plugins/like/)中生成的代碼。我使用的是標準佈局,沒有發送或面孔。按鈕本身顯示並正常工作。但是,註釋對話框不顯示。社交插件像按鈕註釋對話框不顯示
我發現了一些關於做這項工作的建議,但到目前爲止還沒有成功。寬度是450px。我嘗試了HTML5,XFBML和IFrame版本。 IFrame版本具有「添加評論」鏈接。該對話框顯示,但被截斷。我也用FB.init。這是我的html。除了像按鈕之類的東西,我認爲它可能與CSS相關,但剝離的版本也不起作用。
<!DOCTYPE html>
<html xmlns:fb="http://ogp.me/ns/fb#">
<body>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'appid', // App ID
channelUrl : '//localhost:8282/myapp/channel.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
// Additional initialization code here
};
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
ref.parentNode.insertBefore(js, ref);
}(document));
</script>
<!-- <div class="fb-like" data-href="http://www.espn.com" data-send="false" data-show-faces="false" data-width="450"></div> -->
<fb:like href="http://www.espn.com" send="false" width="450" show_faces="false" />
</body>
</html>
有時,它只需要第二雙眼睛。先謝謝您的幫助。