Add Facebook Recommendations Bar To Blogger - Helper Blogger

Blogger Widgets | Templates | Tutorials

Latest

Monday, 2 July 2012

Add Facebook Recommendations Bar To Blogger




In order to keeping busy visitors on our blogs finally we got the plugin which we have been waiting from long time,recently facebook has launched their "Recommendation Bar" in beta version,the Recommendation Bar is a plugin which shows a number of some recommended articles for your readers or visitors and you can set number of recommended articles,when any visitor visits to your any post,after some specific time the plugin pop ups at the right/left corner of your blog with the recommended articles,thats why its helps you to keep busy your visitors on your blog.The plugin contains title of your post,thumbnail and number of likes just below of that post and the plugin shows the only those articles which are previously liked or shared on facebook.If you want more such plugins then I am listing some similar widgets and plugins -

Now lets see how to add facebook recommendations bar to blogger?

How To Add Facebook Recommendations Bar To Blogger?


For better understanding I am dividing this post in two parts and they are as below,


  1. Creating new Facebook App
  2. Adding Facebook Recommendations Bar To Blogger

Part 1 : Creating new Facebook App

To create Facebook app for your Recommendation Bar follow below steps,
  • First go to Facebook Apps and login with your Facebook account
  • Click on Create New App button at top right corner

  • As soon as you hit Create New App button a pop up box will appear.In App Name field fill Recommend Bar and keep all it is and hit Continue button.
Click On Image To Enlarge

  • Enter the captcha as shown in image and hit Submit button

  • Now you will redirect to an another page.Scroll down and click on Website with Facebook Login tab and inside the box input your blog URL.Now leave all fields as it is and click Save Changes
Click On Image To Enlarge


  • Now copy your App ID and paste it into notepad,we will need it later.


Great,you have created your App.Now lets see how to add Recommendations Bar to blogger.

Part 2 : Adding Facebook Recommendations Bar To Blogger


  1. Go to Blogger Dashboard > Template
  2. Download a copy of your template
  3. Click on Edit HTML
  4. Hit Proceed button
  5. Now search for below code in your template


<html


replace it with below code,

<html xmlns:fb='http://ogp.me/ns/fb#'


Now find for below code,

<body>


just below of it paste following code,

Note - If you are using default blogger templates then search for <body tag instead of above code.

<div id='fb-root'/> 
<script> 
//Facebook Recommendation bar by http://www.helperblogger.com/
//this notice must stay intact for legal use
//For more visit http://www.helperblogger.com/
//<![CDATA[
(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/en_US/all.js#xfbml=1&appId=YOUR APP ID HERE"; 
  fjs.parentNode.insertBefore(js, fjs); 
}(document, 'script', 'facebook-jssdk'));
//]]> 
</script> 
<b:if cond='data:blog.pageType == &quot;item&quot;'><b:if cond='data:blog.pageType != &quot;static_page&quot;'><div style='z-index:999999; position:absolute;'> 
<fb:recommendations-bar action='like' max_age='0' num_recommendations='3' read_time='10' side='right' site='http://www.helperblogger.com/' trigger='40%'/></div> 
</b:if></b:if>


  • Replace APP ID HERE with your APP ID which you have created in first part
  • Replace http://www.helperblogger.com/ with your blog URL.
  • The widget will only appear on post pages and not on homepage or static pages. To display it on all pages, then simply delete the lines in red color.
  • If you want to change number of recommendations then simply change the value 3
  • If you don't want to show your old articles then edit the value max_age='0',you can set it to 1-180.But if you don't want to take age into account then let it be 0 as default.
  • If you want to change position of bar to right to left then simply replace right with left. 
  • When any visitor comes to your blog,after specific time the bar expand.I have set the time to 10 seconds to chnage it just change value 10.
Finally save your template and visit your post pages.

The installation of this plugin is longer but it is easy.If are getting any problem then feel free to post it via comment form.I'll glad to help you :)

Peace And Blessings Buddies.....

20 comments:

  1. you've posted wonderful article, but i won't apply on my site.
    www.blogtariff.com

    ReplyDelete
  2. Hey sorry to hear about bx error.But try to use different browser for some while,also try after clearing browser's cookies and caches.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Dear Brother When I Replace <html xmlns:fb='http://ogp.me/ns/fb#' That Code With <Html Then This Bellow Problem/Message Was Showing Up...???

    Error parsing XML, line 2, column 327: Attribute "xmlns:fb" was already specified for element "html".

    So What is The Problem !!! Please Reply Me...Thankz

    ReplyDelete
    Replies
    1. here is the solution to this problem please see this post

      http://www.howtoread.co.in/2013/04/facebook-recommendation-bar-parsing-error-solution.html

      Delete
  5. Brother.....it won't showup on My Blog
    what should i do????
    www.agazsantiago.com

    ReplyDelete
  6. Rahul..
    nice article!
    what if you have created facebook app with other things like facebook comment box and the like box... Do you still need to create a new app so as to get ID ... Or you can use the same ID with your facebook like box..?

    ReplyDelete
  7. hey i have tried this on my blog...http://yomixin.blogspot.in/
    this widget is also showing...but posts are not there..why..??

    ReplyDelete
  8. Hey Buddy that's awesome it look fantastic though it took sometime and i struggle with some error then eventually it worked, you code explanation is very simple.

    Please get give any article of Facebook like pop up gadget that can be cancelled, i have seen many popup gadget that has a close icon but that's not available for Facebook pop up please upload it.

    ReplyDelete
  9. Rahul,

    Sorry to bother you but as installed it and its working but it picks up only a few post not all, i mean one by one it should pick all the post, i changed max_age to 0 but still not to avail.

    Please visit if you get time.
    www.technology-howto.com

    ReplyDelete
  10. one of the best widget of your blog....

    i m a big fan of your blog and have applied half of your widgets onto my blog..

    please visit @ http://www.indiantaxupdates.com

    ReplyDelete
  11. i added this to my blog but it didnt working why...?
    www.topsoftdown.com

    ReplyDelete
  12. Also Not Working On my site
    www.pareshgiri.com

    ReplyDelete
  13. it's working in firefox thanks bro.

    ReplyDelete
  14. here is the solution to

    Error parsing XML, line 4, column 290: Attribute "xmlns:fb" was already specified for element "html problem visit this below link

    http://www.howtoread.co.in/2013/04/facebook-recommendation-bar-parsing-error-solution.html

    ReplyDelete
  15. Hi Administrator,
    This is a very nice blog for people. It helps people. Thanks for given us this information. Please keep it up your work.

    well, this is my site app development companies

    you may visit and can share your opinion with us.

    ReplyDelete

If you want to be informed about any replies then check "Notify me" option (present at lower right corner of comment box and it will display if you are logged in to your google account). PLEASE DO NOT SPAM