问题
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>
回答1:
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
回答2:
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>
来源:https://stackoverflow.com/questions/18020641/facebook-button-not-showing-up