How to add Facebook posts recommended bar for blogspot/
add Facebook posts Like bar for blogspot
1. Adding Open Graphs meta tags
To make Facebook Recommendations Bar run, your blog must contain Open Graphs meta tags. Therefore, you must insert the below code affter
<head> tag
- <!-- Begin Open Graph metadata -->
- <b:if cond='data:blog.pageType == "item"'>
- <meta content='article' prop
erty='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'pro perty='og:image'/> - </b:if>
- <b:else/>
- <meta expr:content='data:
blog.title' property='og: title'/> - <meta content='website' prop
erty='og:type'/> - </b:if>
- <meta expr:content='"en_
US"' property='og:locale' /> - <meta expr:content='data:blog.
canonicalUrl' property='og: url'/> - <!-- End Open Graph metadata -->
Note: Just add this code. It won't be hamful to your SEO code.
2. Adding plugin widget code
b) Pree Get code (the first time)
c) Click create a new app
d) Fill in the App Name your blog name and App URL is your blog address. Press "continue"
e) Fill in th Capcha and press Submit
f) Press Get code again
g) Copy the first code JavaScript SDK code (First Box Code)
h) go to > Edit HTML
i) Fill the code that you have just copied affter the
<body> tag
3. Customizing
and insert the below code affter
<data:post.body/>
- <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>
You can customize number of related posts to show, position of bar (right/left)..…
data-read-time
– waiting time before widget pop up. (30s by default. The smallest number of seconds is 10s)data-action
– you can choose 'like', or 'recommend'data-side
– Position of widget: 'left' or 'right'num_recommendations
– Number of posts to show. Maximum: 5 posts
All the best,
Hồng Hòa Vi
Hồng Hòa Vi
Đăng nhận xét