0

I was trying to clean up some code that a friend helped me with a while back, and I ran across a text widget that displays my Facebook Like box. I've pasted the code below. Do I need all of this code? When I go to Facebook and try set up the Like Box from scratch, it does not have the . I didn't know what that was for, and if I needed it. Also should I have the in the text widget or put that in the header.php file ?

<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-box" data-href="http://www.facebook.com/noahsdadcom" data-width="300" data-colorscheme="dark" data-show-faces="true" data-stream="false" data-header="false"></div>
4

1 回答 1

2

Yes, you need all this code for facebook likebox to work.
Also, dont try to clean, unless you know alot about that language (experience ;) )

于 2012-05-18T18:49:58.807 回答