Skip to content

Instantly share code, notes, and snippets.

@seyedi
Created February 15, 2015 07:45
Show Gist options
  • Save seyedi/9268ed6a43db464c1082 to your computer and use it in GitHub Desktop.
Save seyedi/9268ed6a43db464c1082 to your computer and use it in GitHub Desktop.

Facebook card


Basic Metadata

put these meta tags in the tag

  • og:title - The title of your object as it should appear within the graph, e.g., "The Rock".
  • og:type - The type of your object, e.g., "video.movie". Depending on the type you specify, other properties may also be required.
  • og:image - An image URL which should represent your object within the graph.
  • og:url - The canonical URL of your object that will be used as its permanent ID in the graph, e.g., "http://www.imdb.com/title/tt0117500/".
<head>
<meta property="og:title" content="The Rock" />
<meta property="og:type" content="video.movie" />
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/" />
<meta property="og:image" content="http://ia.media-imdb.com/images/rock.jpg" />
...
</head>

Optional Metadata

  • og:description - A one to two sentence description of your object.
  • og:site_name - If your object is part of a larger web site, the name which should be displayed for the overall site.

Twitter card


Standard twitter card

put these meta tags in the tag

<head>
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@publisher_handle">
<meta name="twitter:title" content="Page Title">
<meta name="twitter:description" content="Page description less than 200 characters">
<meta name="twitter:creator" content="@author_handle">
<-- Twitter Summary card images must be at least 120x120px -->
<meta name="twitter:image" content="http://www.example.com/image.jpg">
...
</head>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment