Add facebook comment on blogger

facebook comment on blogger
Add comment to facebook for bloggers really needed. Currently facebook is the largest social network is believed to be using the advent. s5tricks please instruct people how to add facebook comment frame to blogger.








How to add Facebook comment frame on blogger/blogspot 

Add facebook comnent

1 : login blogger  >> Select template >> Edit HTML

Insert the code below into the front </head>
<script type='text/javascript'>
//<![CDATA[
var purl= location.href;
var fb_href = purl.substring(0,purl.indexOf(".html")+5);
var fbcm ='<div class="fb-comments" data-href="'+fb_href+'" data-num-posts="8" data-width="766"></div>';
//]]>
</script>

Note: you change the parameters below
  • data-num-posts="8": Number of comments is allowed to show, if more then automatically pooled.
  • data-width="766px": The width of the frame comment to Facebook.
 2: Ctrl F, search </body>

Insert the code below into the front   </body>

<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 = "//connect.facebook.net/vi_VN/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>

Add facebook comment

Insert comment frame to facebook where you want to show in the blog 

  1.  Ctrl F  search <b:include data='post' name='post'/>
  2.  Copy the code below to paste
<b:if cond='data:blog.pageType == "item"'> <script type='text/javascript'> document.write(fbcm); </script> </b:if>
      3. Note: some sample templates (interface) have more than one line the first line you choose, find, then save again, if not, we choose another line:D

      4: Save

SHARE THIS
Previous Post
Next Post