Facebook Button not showing up

2019-09-10 04:59发布

I've looked at the other post on here for issue's with Facebook like button not showing up and can't seem to figure out why in the world the Facebook like button I am trying to add is not showing up. I've followed the steps on the FB developer page but still not showing. Here is my code. Is there something wrong that I am not seeing or doing?

<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&appId=1402069220010998";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<div class="fb-like" data-href="http://www.winvipconcert.com"data-width="350" data-show-faces="false" data-send="false"></div>

2条回答
Evening l夕情丶
2楼-- · 2019-09-10 05:34

Your code works fine for me on chrome and firefox. My guess is this is a styling issue. Check the styles of the container that wraps the div.fb-like

查看更多
兄弟一词,经得起流年.
3楼-- · 2019-09-10 05:47

Try the following, there is little difference between your code but see if it works.

<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 = "http://connect.facebook.net/en_US/all.js#xfbml=1&appId=1402069220010998";
  fjs.parentNode.insertBefore(js, fjs);
  }(document, 'script', 'facebook-jssdk'));
</script>
查看更多
登录 后发表回答