Here is the code that the facebook developer page gave me for my site. I've tried putting it in by itself in the body of my code and with and iframe but cant get it to work. any help is appreciated. thanks
<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'));</scri开发者_如何学JAVApt>
<div class="fb-like-box" data-href="http://www.facebook.com/lapastabella" data-width="292" data-show-faces="true" data-stream="true" data-header="true"></div>
Try changing this line:
<div id="fb-root"></div>
To:
<div id="facebook-jssdk"></div>
It looks like an error with the code they give you. If you read the code its looking for an object with an id of facebook-jssdk which doesn't exist.
精彩评论