HOW TO ADD FACEBOOK LIKE BUTTON UNDER EACH POST OF YOUR BLOG


  If you are reading a blog post,you may be seeing something like "like this post" below the post you are reading,so it will appear on your facebook friends wall,if your friend see this,they may also like to visit the blog which means it help in driving traffic to your website or your blog.
By reading this,facebook like button will appear below every post in your blog.
HOW TO:-

     1.Fistly you have to copy and past this below code
<div id='fb-root'/>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = &quot;//connect.facebook.net/en_US/all.js#xfbml=1&quot;;
  fjs.parentNode.insertBefore(js, fjs);
}(document, &#39;script&#39;, &#39;facebook-jssdk&#39;));</script>
 immediately after this line
 <body>
  in your HTML.
   NOTE:you should check Expand Widget Templates So the full code can appear you may not see this code <data:post.body/>
if you do not check the box.
   2.Secondly,copy and past this code
<div class='fb-like' data-send='false' data-show-faces='false' data-width='450'/>
 Just below this line
 <data:post.body/>
  in your HTML.
  If you will like your reader to send your post to facebook after being liked,then replace that "false" with the word true.Also if you like the face of those that liked your post to display under your post,then replace that "false" with the word true,If you adjust the size of the button,then increase or reduce 450.
That is all but click PREVIEW to see if it has be done perfectly,if you see something like this

Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly. <br/> XML error message: The element type "span" must be terminated by the matching end-tag "</span>".


Error 500

 instead of your blog page,then you have done a mistake,click CLEAR EDITS to unsave your work.Try again if it work perfectly then click save template and you are done.

0 comments:

Post a Comment