Friday 24 June 2016

How to integrate facebook like button in website?

How to integrate facebook like button  in website

Question: What is facebook like button?
Facebook give an embed code for like button, when you embed code this code people can like your page with this. They can also view friends who already have like your page.

Question: What are the requirement for facebook like button?
You must have following:
  1. Facebook Account
  2. Facebook App, If not
  3. An Website where you will you will embed the code.

Question: How to get embed code for like button?
Open and follow below steps
  1. Choose an URL of a website Page you want to use with the like button.
  2. Code Configurator from
  3. Click on "Get Code" and past the code in website

Question: Give the sample code of Facebook like button?
<div id="fb-root">
<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>

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