Facebook like button integration on your website ~ Web CodeHelpers

Facebook like button integration on your website




As per the facebook latest update on the developer website , Facebook updated the like button code


Step 1:

To Integrate facebook like button on your website , you need a facebook app id check below link


Create Facebook App as per Lastest Facebook Revision
Step 2:

After getting the App ID

Include the JavaScript SDK on your page once, ideally right after the opening <body> tag.

In the below code at the line number 7, you need to replace your "appId" with existing "appId"

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


Place the code for your plugin wherever you want the plugin to appear on your page. In the

Facebook Like Button Standard Code

<div class="fb-like-box" data-header="false" data-href="https://www.facebook.com/WebCodeHelpers" data-show-border="true" data-show-faces="true" data-stream="false" data-width="292">

Facebook Like Button Standard Code Example



Place the code for your plugin wherever you want the plugin to appear on your page. In the

Facebook Like Button Count Code

<div class="fb-like" data-href="https://www.facebook.com/WebCodeHelpers" data-width="450" data-layout="button_count" data-show-faces="true" data-send="true"></div>

Facebook Like Button Count Code Example



Place the code for your plugin wherever you want the plugin to appear on your page. In the

Facebook Like Box Count Code

<div class="fb-like" data-href="https://www.facebook.com/WebCodeHelpers" data-width="450" data-layout="box_count" data-show-faces="true" data-send="true"></div>

Facebook Likeox Button Code Example

0 comments :

Post a Comment

Subscribe updates via Email