Facebook就像按钮没有显示在页面上

时间:2013-10-26 05:46:35

标签: html css facebook

嘿伙计们我试图找出类似按钮的代码。在Facebook上使用向导。按钮仍然不会显示。我的意思是即使是这样的简单HTML。

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

有关该按钮未显示的原因的任何线索?多数民众赞成直接从向导中复制而在身体中没有任何其他东西,它仍然不起作用....

1 个答案:

答案 0 :(得分: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>