Adding Facebook Like Button to Website


How do I add the Facebook Like button to my Website?



Adding the Facebook Like button to your Website is really easy. You can get it done 3 steps:

1. Open the HTML source code of your Website and add the following code right after the opening <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. Move to the location in the HTML source code where you want the Like button to show and enter the following code:

<div class="fb-like" data-href="/your_website_url" data-layout="standard" data-action="like" data-show-faces="true" data-share="true"></div>

3. Upload the modified HTML source code to your Website.

4. Test it out and done.


⇒ Adding Image on Website for Facebook Share

⇐ Integrating Website with Facebook

⇑ General Questions on Facebook

⇑⇑ Facebook - Frequently Asked Questions

2015-10-24, 1567👍, 0💬