Adding facebook like button to my website

asked Apr 1, 2012 in General by MirrorXYZ (1,400 points)
Hello there

how can I add a facebook like button to my website?


2 Answers

0 like 0 dislike
answered Apr 1, 2012 by FixHost (12,380 points)
You can add a Facebook Like button to any page with an iframe tag:

      <title>My Great Web page</title>
       <iframe src=""
        scrolling="no" frameborder="0"
        style="border:none; width:450px; height:80px"></iframe>
0 like 0 dislike
answered Apr 2, 2012 by rsuog (680 points)
1. Include the following JavaScript on your webpage before </body> tag.

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

2. Place this code wherever you want the like button to appear.

<div class="fb-like" data-href="" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false"></div>

Or you can use the configurator ( to get code to add to your site.