Saturday, 16 August 2014

How To Add A Facebook Like Button To Each Blogger Post

Step 1: Go to your Blogger Dashboard.

Step 2: In the sidebar, click on 'Theme' and then 'Edit HTML'.

Step 3: Click anywhere in the Code Area and press Ctrl+F. A Search Box will appear in the upper right corner.
Enter this code in the box and press Enter twice. We need to work with the second result.
<data:post.body/>
Step 4: Now, we have to paste the code for our Facebook Like button.
If you wish to add the like button above the posts, add the code before the <data:post.body/> tag and if you want it to appear at the end of each post, add it after the tag.
Select the code as per your choice among the following types of Facebook Like buttons.
Copy this code for button_count Facebook like button.
<br/><iframe allowTransparency='true' expr:src='&quot;http://www.facebook.com/plugins/like.php?href=&quot; + data:post.canonicalUrl + &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:21px;'/>
Copy this code for box_count Facebook like button.
<br/><iframe allowTransparency='true' expr:src='&quot;http://www.facebook.com/plugins/like.php?href=&quot; + data:post.canonicalUrl + &quot;&amp;layout=box_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:55px; height:62px;'/>
Copy this code for standard Facebook Like button.
<br/><iframe allowTransparency='true' expr:src='&quot;http://www.facebook.com/plugins/like.php?href=&quot; + data:post.canonicalUrl + &quot;&amp;layout=standard&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:450px; height:35px;'/> 
Step 5: Click on 'Save Theme'.

The Facebook Like button will be added to all your existing posts as well as the posts you create thereafter. 

No comments:

Post a Comment