Web Hosting Geeks | Web Hosting Experts
Need help? Call us 1(866)TOP-HOST

14625 reviews 1734 hosting providers

Questions & Answers

Adding facebook like button to my website

Apr 2, 2012 by MirrorXYZ
Hello there

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


2 Answers

0 votes
Apr 2, 2012 by FixHost
You can add a Facebook Like button to any page with an iframe tag:

      <title>My Great Web page</title>
       <iframe src="http://www.facebook.com/plugins/like.php?href=YOUR_URL"
        scrolling="no" frameborder="0"
        style="border:none; width:450px; height:80px"></iframe>
0 votes
Apr 2, 2012 by rsuog
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); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=230995360244561";
  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="http://yourwebsite.com/yourwebpage.html" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false"></div>

Or you can use the configurator (http://developers.facebook.com/docs/reference/plugins/like/) to get code to add to your site.