Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Open Graph Protocol/ Meta Tags/ Micro Data for Blogger
// Turn <head> tag like this -
<head prefix='og: fb: article:'>
// Then just below this add this code -
// Copyright (c) 2013, Vinay Prajapati, Tech Prevue Labs, India
<b:if cond='data:blog.pageType != &quot;index&quot;'>
<meta expr:content='data:blog.title' property='og:site_name'/>
<meta expr:content='data:blog.pageName' property='og:title'/>
<meta content='article' property='og:type'/>
<meta expr:content='data:blog.title' property='og:title'/>
<meta content='blog' property='og:type'/>
<meta expr:content='data:blog.metaDescription' property='og:description'/>
<meta expr:content='data:blog.canonicalUrl' property='og:url'/>
<b:if cond='data:blog.postImageThumbnailUrl'>
<meta expr:content='data:blog.postImageThumbnailUrl' itemprop='image'/>
<meta content='http://blog-img-url' property='og:image'/>
<meta content='1020412247' property='fb:admins'/>
<meta content='348446671899960' property='fb:app_id'/>
<meta content='214801001979659' property='fb:page_id'/>
<meta content='en_US' property='og:locale'/>
<meta content='en_GB' property='og:locale:alternate'/>
<meta content='hi_IN' property='og:locale:alternate'/>

This comment has been minimized.

Copy link
Owner Author

@vinayprajapati vinayprajapati commented Jul 1, 2013

Some values to change -

  1. Line 21 - "http://blog-img-url" url should be used as per your blog logo; square size is best.
  2. Line 23, 24 25 - Facebook admin id, app id, and page id may added in which values are 1020412247, 348446671899960, 214801001979659 respectively
  3. Line 26 - If you are not a English US blogger then then en_US should be changed with your og:locale
  4. Line 27, 28 - Alternate og:locale may be added, which are currently en_GB and hi_IN respectively. You may delete these lines.

This comment has been minimized.

Copy link

@SidVal SidVal commented Jan 7, 2017

I do not remember where I read it, but I think today you don't need to add "fb:admins" property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment