2013-10-26 113 views
2

嘿傢伙我試圖找出像按鈕代碼。在Facebook上使用該向導。按鈕仍然不會顯示。我的意思是即使是這樣一個簡單的HTML。Facebook的按鈕沒有顯示在頁

<!DOCTYPE html> 
<html> 
<head> 
</head> 
<body> 

<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_US/all.js#xfbml=1"; 
    fjs.parentNode.insertBefore(js, fjs); 
}(document, 'script', 'facebook-jssdk'));</script> 

<div class="fb-like" data-href="https://facebook.com/jameshenrypcsolutions" data-width="125" data-height="40" data-colorscheme="light" data-layout="button_count" data-action="like" data-show-faces="false" data-send="false"></div> 

爲什麼該按鈕沒有顯示出來的任何線索?那從沒有別的體內向導直接複製,它仍然無法正常工作....

回答

0

WORKING DEMO

<div class="fb-like" data-href="https://facebook.com/jameshenrypcsolutions" data-width="The pixel width of the plugin" data-height="The pixel height of the plugin" data-colorscheme="light" data-layout="standard" data-action="like" data-show-faces="true" data-send="false"></div> 

<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_US/all.js#xfbml=1"; 
    fjs.parentNode.insertBefore(js, fjs); 
}(document, 'script', 'facebook-jssdk'));</script> 
+2

我遇到了同樣的問題,你的演示沒有工作了 –