How to add facebook like and share button

facebook like and share button

Facebook Like and Share button will help the people to share the content to their friends. It is also help the site owners to get more visitors to their websites.

To add facebook like and share button in your website first you have to insert JavaScript SDK on your page, ideally right after the opening <body> tag.

Facebook JavaScript SDK

<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>

After inserting JavaScript SDK then place the code for your plugin wherever you want the plugin to appear on your page. For that just copy plugin code and you must alter it.

Plugin Code

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

In this plugin code you must change the to your page url that you want to appear on your website.

After this you can view your Facebook Like button in your page. If you want more customization use this settings.

0 I like it
0 I don't like it

Leave a Reply

Your email address will not be published. Required fields are marked *