Last Updated: December 19, 2019
·
4.125K
· jeremymorgan

Template for Open Graph Headers

This is a template for building open graph tags for your webpages so you can display information better on Google+, Twitter and Facebook.

Yes, some are deprecated but required for stable use on Facebook.


<meta itemprop="name" content="[ TITLE ]" />
<meta itemprop="image" content="[ LISTING IMAGE ]" />
<meta itemprop="description" content="[ ARTICLE DESCRIPTION ]" />

<meta name="description" content="[ ARTICLE DESCRIPTION ]" />
<meta name="author" content="[ AUTHOR FULL NAME ]" />

<meta property="article:author" content="[ GOOGLE+ AUTHOR URL ]" />
<meta property="article:published_time" content="[ PUBLISHED TIMESTAMP ]" />
<meta property="article:section" content="[ CATEGORY ]" />

<meta property="og:title" content="[ TITLE ]" />
<meta property="og:type" content="article" />
<meta property="og:description" content="[ ARTICLE DESCRIPTION ]" />
<meta property="og:image" content="[ LISTING IMAGE ]" />
<meta property="og:url" content="[ CANONICAL URL OF ITEM ]" />
<meta property="og:site_name" content="[ WEBSITE NAME ]" />

<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="[ TITLE ]">
<meta name="twitter:description" content="[ ARTICLE DESCRIPTION ]">
<meta name="twitter:image" content="[ LISTING IMAGE ]">
<meta name="twitter:url" content="[ CANONICAL URL OF ITEM ]">
</pre>

Fork it on Github:

https://gist.github.com/JeremyMorgan/5645469