Skip to content

Instantly share code, notes, and snippets.

@mautematico
Forked from matthewhudson/gist:1603502
Created October 12, 2015 04:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mautematico/56457a9c84d6d2d88dab to your computer and use it in GitHub Desktop.
Save mautematico/56457a9c84d6d2d88dab to your computer and use it in GitHub Desktop.
Integrate Open Graph with Tumblr
<!-- Open Graph tags for your home page (index). -->
<meta property="og:site_name" content="{Title}" />
<meta property="fb:app_id" content="FACEBOOK_APPID"/>
<meta property="fb:admins" content="FACEBOOK_USERID" />
<meta property="og:description" content="{MetaDescription}" />
<meta property="og:locale" content="en_US" />
{block:IndexPage}
<meta property="og:image" content="{PortraitURL-128}" />
<meta property="og:title" content="{Title}" />
<meta property="og:type" content="blog" />
<meta property="og:url" content="YOUR_SITE_URL" />
{/block:IndexPage}
{block:PostSummary}
<meta property="og:title" content="{PlaintextPostSummary}" />
{/block:PostSummary}
<!-- Open Graph tags to customize your permalinks. -->
{block:Permalink}
<meta property="og:type" content="article" />
<meta property="og:url" content="{Permalink}" />
{block:Posts}
{block:Text}
<meta property="og:image" content="http://static.tumblr.com/vswwmyc/mmHla8c7g/text.png"/>
{/block:Text}
{block:Photo}
<meta property="og:image" content="{PhotoURL-500}"/>
{/block:Photo}
{block:Photoset}
<meta property="og:image" content="http://static.tumblr.com/vswwmyc/ACBla8cb5/photo.png"/>
{/block:Photoset}
{block:Quote}
<meta property="og:image" content="http://static.tumblr.com/vswwmyc/kahla8ccw/quote.png"/>
{/block:Quote}
{block:Link}
<meta property="og:image" content="http://static.tumblr.com/vswwmyc/K6Vla8cek/link.png"/>
{/block:Link}
{block:Chat}
<meta property="og:image" content="http://static.tumblr.com/vswwmyc/9Ysla8cgl/chat.png"/>
{/block:Chat}
{block:Video}
<meta property="og:image" content="http://static.tumblr.com/vswwmyc/KiUla8chx/video.png"/>
{/block:Video}
{block:Audio}
<meta property="og:image" content="http://static.tumblr.com/vswwmyc/FyZla8c36/audio.png"/>
{/block:Audio}
{block:Answer}
<meta property="og:image" content="{AskerPortraitURL-128}"/>
{/block:Answer}
{/block:Posts}
{/block:Permalink}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment