How to add Facebook LIKE, Recommend, and Share buttons to your Blogger?

How to generate Facebook CODE specific to my site?


1. Visit the following site and choose the options you like.

https://developers.facebook.com/docs/plugins/like-button/


How to update the Blogger.com page?

WARNING:

  • Please backup your blog first, see below. 
  • I assume that you have some experience with HTML/CSS/JavaScript


2. Open your Blogger.com > Design > Theme > Customize (please backup here) > Edit HTML

3. Control-F to find: <body

4. Paste the first script provided by Facebook


<body expr:class='&quot;loading&quot; + data:blog.mobileClass'>
<!-- START Facebook buttons Recommend and Share -->
<!-- https://developers.facebook.com/docs/plugins/like-button/ -->
<div id='fb-root'/>
<script async='async' crossorigin='anonymous' defer='defer'
nonce='Om0b5IFR'
src='https://connect.facebook.net/en_US/sdk.js#xfbml=1&amp;
version=v14.0&amp;appId= SOMETHIG FOR YOU &amp;autoLogAppEvents=1'/>
<!-- END Facebook buttons Recommend and Share -->

5. Control-F to find: post-icons

6. Paste the second part of the script generated by Facebook


<!-- START Facebook buttons Recommend and Share -->
<br/><br/>
<div class='fb-like'
data-action='recommend'
data-layout='button_count'
data-share='true' data-size='large'
data-width=''
expr:data-href='data:post.url'
/>
<br/><br/>
<!-- END Facebook buttons Recommend and Share -->
</span> <span class='post-icons'>

Please note that I replaced the URL you provided to Facebook with expr:data-href='data:post.url'

This will load the given post's URL and not the static link you provided.

You should be able to see the blue buttons underneath this post, please click BOTH!


As an Amazon Associate I earn from qualifying purchases.

My favorite quotations..


“A man should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.”  by Robert A. Heinlein

"We are but habits and memories we chose to carry along." ~ Uki D. Lucas


Popular Recent Articles