Integrate Facebook Share button on your website ~ Web CodeHelpers

Integrate Facebook Share button on your website

Facebook  share button is a social plugin that enables people to share  your site. 

Step 1:

To Integrate facebook Share 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); = id;
  js.src = "//";
  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 Share Button Code

<div class="fb-send" data-href=""></div>

Facebook Share Button Code Example


Post a Comment

Subscribe updates via Email