Home » » How to Add the Facebook Like Button Below every Post

How to Add the Facebook Like Button Below every Post

Like Button
<div>
<b:if cond='data:post.isFirstPost'>
<script>(function(d){
  var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
  js = d.createElement('script'); js.id = id; js.async = true;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
  d.getElementsByTagName('head')[0].appendChild(js);
}(document));</script>
</b:if>
<fb:like expr:href="data:post.canonicalUrl" layout='standard' send='true' show_faces='false' font="arial" action="like" colorscheme="light"></fb:like>
</div>

2. Copy the Above code. Login to your Blogger Account and go to Design > Edit HTMLand click on the check box which says “Expand Widget Templates
3. Look for <data:post.body/> and immediately below that place the copied code.

4.Next you have to add the fb namespace to your template tag.Your template should have the specification for the fb tag that you have used. The following namespace declaration will take care of that. To declare the namespace, find

<html

and change it to

<html xmlns:fb="https://www.facebook.com/2008/fbml"

The following screenshot will help you out.











4. Now Save the template and you should see the Like Button near each of your posts. You are done :)
Share this article :

0 comments:

Post a Comment

Recent Posts

पुराना पोस्टहरु

Nepali Date Convertor

 
Support : FOOT1 | FOOT2 | FOOT3 | FOOT4 | FOOT5 | FOOT6 | FOOT7
Copyright © 2011. Gaurab Shrestha | गौरब श्रेष्ठ - All Rights Reserved
Blog Design by Gaurab Shrestha Helped by Ram Sharan Shrestha
Proudly powered by BLOGGER