Follow Me:

Monday, September 1, 2014

Facebook Open Graph Meta Tags for Blogger

Facebook Open Graph Meta Tags Blogger

Well today we are going to see on how to add Facebook Open Graph tags on your blog. This is really very simple and easy trick to add meta tags in your blog template. You just need to follow the steps below on adding it:


Lets Start Adding Facebook Open Graph Meta Tags:

1. Go to Blogger Blog > Template > Edit HTML [First Backup up your template before adding meta tags.]

2. Find the  <head> tag in your template and below it paste the meta tags given below.

<meta property='og:title' expr:content='data:blog.pageTitle'/>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<meta property='og:type' content='article'/>
<b:else/>
<meta property='og:type' content='website'/>
</b:if>
<meta property='og:url' expr:content='data:blog.canonicalUrl'/>
<!-- Large image, original size -->
<b:if cond='data:blog.postImageUrl'>
<meta property='og:image' expr:content='data:blog.postImageUrl'/>
<b:else/>
<!-- Thumbnail image, 72 × 72 pixels fixed-->
<b:if cond='data:blog.postImageThumbnailUrl'>
<meta property='og:image' expr:content='data:blog.postThumbnailUrl'/>
<b:else/>
<!-- Use favicon or your own image URL -->
<meta property='og:image' expr:content='data:blog.blogspotFaviconUrl'/>
</b:if>
</b:if>
<b:if cond='data:blog.metaDescription'>
<meta property='og:description' expr:content='data:blog.metaDescription'/>
<b:else/>
<meta property='og:description' content='{{DEFAULT SITE DESCRIPTION GOES HERE}}'/>
</b:if>
<meta property='og:site_name' expr:content='data:blog.title'/>

<meta property='fb:admins' content='{{Your FB ADMINS}}'/>
<meta property='fb:app_id' content='{{Your APP ID}}'/>

3. Add your own description, fb:admins and app id which is in bold color. Save your blog template and you are all done.

This is the simplest way adding Facebook Open Graph to your blog. Now write a post and share to see how the fb meta tag works.

If you like are tutorials, Stay connected and Keep Subscribed to our blog for more Tutorials.

Drop a comment below if you have any problem regarding this post.

4 comments:

  1. I really needed this on my blog i used a lot of meta tag some don't work properly but for this i thank you...

    ReplyDelete
  2. This is awesome as you don't need to add any image and no errors... Thanks for the tag

    ReplyDelete

Creative Commons License