Pages

Sunday, September 25, 2016

How to add Facebook share button in Blogger posts

Steps

Go to Blogger > Posts > open the post from HTML view.

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


<div id="fb-root"></div>
<script async="" crossorigin="anonymous" defer="" nonce="eyNIFv3r" src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&amp;version=v18.0"></script>


Place below code wherever you want the plugin to appear on your page. In my case it is in the bottom of the page.

<div class="fb-share-button" data-layout="button" data-size="small"><a class="fb-xfbml-parse-ignore" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fmycloudpro.blogspot.com%2F&amp;src=sdkpreparse" target="_blank">Share</a></div>




Result:


Thank You!