Recently, Facebook released their brand new social plugin named Facebook Recommendations Bar. This plugin allows any users to share and like content. Only those articles are displayed that are previously liked or shared on Facebook. The number of likes are displayed under each article along with page title and a thumbnail. It also contains a like button. Now this tutorial will show you how to install latest Facebook Recommendations Bar widget to blogger.
Creating Facebook Recommendations Bar Widget
- Go to official Facebook Recommendations Bar page.
- Now, click on Get Code Button.
- Now Click on create a new app
- Enter App Name as your Blog Title and App URL with your Blog URL then Click on Continue button.
- Enter Captcha Code Code and Click on Submit button
- Now Click on Get Code Button once again.
- Next copy the JavaScript SDK code shown below.
- Now Go to Blogger Dashboard
- Click on DropDown Menu and select Template
- Backup your Template before making any changes to your blog
- Now Click on Edit HTML --> Proceed --> Expand Widget Templates
- Press Ctrl + F and search the code shown below
</body>
- Now Paste the JavaScript SDK copied code just above/before it
- Now search for </head> code and add the following lines of code above it.
<b:if cond='data:blog.pageType == "item"'>
<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='"en_US"' property='og:locale'/>
<meta expr:content='data:blog.canonicalUrl' property='og:url'/>
<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='"en_US"' property='og:locale'/>
<meta expr:content='data:blog.canonicalUrl' property='og:url'/>
- Next, search for <data:post.body/> code and add the following lines of code After it.
<b:if cond='data:blog.pageType == "item"'><div class="fb-recommendations-bar" expr:data-href="data:post.url" data-read-time="30" data-action="like" data-side="right" expr:data-site="data:blog.homepageUrl" data-num-recommendations="2"></div></b:if>
- Now save your template
5 comments
Awesome Post Sonu !
http://toptechfaq.blogspot.in
Brother When I Done This It Show Me Some Error Like This..given In Below Image..Tell Me How To Fix It..
http://i49.tinypic.com/24lr7uq.jpg
@Sunil You have done something wrong. Install this widget with more attension
i cant save the code which was generated by facebook... i created app and tried to paste the JAVA SDK... but when i save that code in blog... it shows this error... http://4.bp.blogspot.com/-QyPxS3SwsC4/UAEIhkNCBwI/AAAAAAAABK0/zVFk5bodqTU/s1600/hjgj.jpg please help me...
@Em Ji Madhu Copy the code and Escape/Encode it with this Tool http://www.latesthack.com/2012/02/blogger-adsense-code-converter.html and paste the code after <body> tag.
Click to Add a New Comment