Want To Add Facebook Recommendation Bar To Blogger/Blogspot Blog?

·

While reading articles on some blogs, you might have noticed a Facebook recommendation bar docked to the lower right (or left) of the screen which expands as you scroll down the page or after you might have finished reading the blog post. This Facebook social plugin was designed to show you a social recommendation of the next article to read on such blogs.

If you add the Facebook recommendation bar to your blog, it will boost your traffic, by allowing you to gain more pageviews, though the bar will only display your blog posts that are previously liked or shared on Facebook. It features the “Like” button and can display up to 5 recommended posts but default is 2. Below is a screenshot of the FB recommendation bar:

So, How Do I Add Facebook Recommendation Bar to Blogger Blog?

You will need to create a Facebook application so as to get your appID which will be needed to make the bar work on your blog. If you already have your appID, probably after reading my tutorial on adding the Facebook comment form to your blog, you can just go to step 2.

STEP 1

==> Visit Facebook Apps SetUp page

==> A small windows will pop out. Type anything you like in the “App Name” field. Make sure it says valid





==> Click the “Continue” button

==> You will be prompted to enter a captcha code. Enter it in the space provided and click on submit

==> A new page will be displayed. Click Website with Facebook Login tab and inside the box, enter your blog URL with an ending slash. See the screenshot below

Do not touch remaining options and click Save Changes.

==> You will also see two strings of alpha-numerical characters on the page. One is App ID and the other is App secret. Just copy the App ID code and keep it save in a notepad. We will need it later

STEP 2

==> Log in to Blogger.com

==> Go to DesignEdit HTML (In Old Blogger Interface) or Click on Blog TitleTemplateEdit HTML (in New Blogger Interface)

==> Tick the “Expand Widgets Templates” box and Use CTRL F to find </body>

==> Add the code below directly above </body>

<div id=’fb-root’/>
<script>
//Facebook Recommendation bar tutorial by Ogbongeblog.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=xxxxxxxxxxxxxxx“;
  fjs.parentNode.insertBefore(js, fjs);
}(document, ‘script’, ‘facebook-jssdk’));
//]]>
</script>

==> Replace xxxxxx with your appID copied in Step1 ( Important)

==> Click on Save Template

STEP 3

==> Still in “Edit HTML” with “Expand Widgets Templates” box ticked, Use CTRL F to find </head>

==> Copy and paste the code below directly above </head>

<b:if cond=’data:blog.pageType == &quot;item&quot;’>
<meta content=’article’ property=’og:type’/>
<meta expr:content=’data:blog.title’ property=’og:site_name’/>
<meta expr:content=’data:blog.pageName’ property=’og:title’/>
<b:if cond=’data:blog.postImageThumbnailUrl’>
<meta expr:content=’data:blog.postImageThumbnailUrl’ property=’og:image’/>
</b:if>
<b:else/>
<meta expr:content=’data:blog.title’ property=’og:title’/>
<meta content=’website’ property=’og:type’/>
</b:if>


<meta expr:content=’&quot;en_US&quot;’ property=’og:locale’/>
<meta expr:content=’data:blog.canonicalUrl’ property=’og:url’/>

==> Click on Save Template

STEP 4

==> Still in “Edit HTML” with “Expand Widgets Templates” box ticked, Use CTRL F to find <data:post.body/>

==> Copy the code below directly after <data:post.body/>

<b:if cond=’data:blog.pageType == &quot;item&quot;’>
<div class=’fb-recommendations-bar’ data-action=’like’ data-num-recommendations=’2‘ data-read-time=’30’ data-side=’right’ data-trigger=’onvisible’ expr:data-href=’data:post.url’ expr:data-site=’data:blog.homepageUrl’/>
</b:if>

==> Click on Save Template

That’s all.

View your blog posts and you should see the Facebook recommendation bar as you scroll down the page.

NOTE

==> You can change the number of recommended posts in the code above though maximum is 5. You can check out the official Facebook recommendation bar page for more info on how to customize the bar.

I hope this helps.

If you have contributions or questions to ask, kindly make use of the comment form below.

Cheers!

Please Share :

Like What You Read?

Sign Up to get similar articles delivered to your email inbox.

Leave a Reply

Your email address will not be published. Required fields are marked *

16 responses to “Want To Add Facebook Recommendation Bar To Blogger/Blogspot Blog?”

  1. Anonymous Avatar
    Anonymous

    I have noticed it on yuor blog few days back but don't know its called recommendation bar. Will try it on my blog later when I am on my computer. thanks for sharing.

  2. infonaija247 Avatar
  3. ahmed Onawale Avatar

    worked partially, after some seconds it displays this "Object Invalid Value: Object at URL 'http://www.techsentral.com/2012/08/blogging-on-blackberry-apps-and-tools.html&#39; of type 'article' is invalid because the given value '' for property 'og:image:url' could not be parsed as type 'url'." and it only displays only two of my post on everytime

    1. Jide Oguns Avatar

      STEP 3 should fix the error bro if you follow the instruction carefully. In the code above, I highlighted "2" and stated clearly that you can change the number to maximum of 5. So, change it to any number you want if the 2 is not OK for you.

  4. Soki Briggs Avatar

    I added this to my New Blog last month only because it was directly from Facebook (Not all these Heavily scripted ones others use)
    And since i've successfully deferred parsing of JavaScript till Page load is complete, it ads no additional load time.

    Plus Bounce rate below 50%
    Nice addon i tell you

    1. Jide Oguns Avatar

      Yes, it's a nice add-on. Makes alot of sense.

  5. Tsquare Avatar

    Nice review here, keep it up and will like to follow ur blog.

  6. Godwin Odey Avatar

    uncopyable, the code above is not copyable

    1. Jide Oguns Avatar

      I have disabled the script that prevented you from copying it. You can retry now bro.

  7. Anonymous Avatar
    Anonymous

    Jide, the codes are not copyable. after highlighting and copying, it shows a different thing when pasted regarding content source.

    1. Jide Oguns Avatar

      Yes, I added the script to my blog because of those that copy my content without linking back. I have disabled the script so you can easily copy the code above. Retry and am sure you will be able to copy it now

  8. Anonymous Avatar
    Anonymous

    cool

  9. Anonymous Avatar
    Anonymous

    Thank you Jide. Just did it and it worked well. Just that the post title always starts with my blog title, therefore they don't show all of the post title. God bless you richly!

  10. vanesa eze Avatar

    it dint work ooooooo

  11. George Emmanuel Avatar

    Hello jide, i have tried it and it did not work on my blog, i am using travel template. pls wat should i do.

  12. Jitendra Raulo Avatar
    Jitendra Raulo

    Thanks for sharing it

Search

Copyright © 2025 | About | Advertise | Privacy Policy | Proudly powered by WordPress