How to add Facebook like button in each post in blogger

facebook like button in each post for blogger


Add facebook like button in each of you posts in blogger. The advantage of facebook like button is that When the user clicks the Like button on your blog/site, a story appears in the user's friends News Feed with a link back to your website. This tutorial will help you to add it.


Go to blogger account and sign-in.


Before adding facebook like button code Back up your Template


Edit html ☞ Expand Widgets Templates


Then search below code by typing "ctrl+f"



<data:post.body/>


If you are getting more than 1 <data:post.body/> then search for




<b:if cond='data:blog.pageType == &quot;item&quot;'><data:post.body/>



and just after it copy and paste the  below code




<iframe allowTransparency='true' expr:src='&quot;http://www.facebook.com/plugins/like.php?href=&quot; + data:post.url + &quot;&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp; action=like&amp;font=arial&amp;colorscheme=light&quot;' frameborder='0' scrolling='no' style='border:none; overflow:hidden; width:100px; height:20px;'/> 



e.g




And save your template.


The above code is Iframe type of code


Note:- There are two Like button : XFBML and Iframe. The XFBML version is more versatile, but requires use of the JavaScript SDK. The XFBML dynamically re-sizes its height according to whether there are profile pictures to display, gives you the ability to listen for like events so that you know in real time when a user clicks the Like button, and it always gives the user the ability to add an optional comment to the like. If users do add a comment, the story published back to Facebook is given more prominence.


For XFBML code go to Developer page




For daily alerts like this Subscribe us now!

Like Our Facebook Page For Daily Free Alerts!

Get Free Email Alerts Daily!

Follow us!

 
Join Us On☞ Facebook ▮ Follow us on ☞ Twitter ▮ Add Us To your ☞ Google+Techinvent

➲ Get Free Daily Latest Updates: Subscribe Us Now ✔

X