Skip to content

Instantly share code, notes, and snippets.

@deepakazad
Created May 13, 2016 22:33
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 deepakazad/9b572e5d10d588ca266b6f844f7336b3 to your computer and use it in GitHub Desktop.
Save deepakazad/9b572e5d10d588ca266b6f844f7336b3 to your computer and use it in GitHub Desktop.
Detect JavaScript Support for Social Link Sharing
<html>
<head>
<title>Example | Your Custom Page Title</title>
<meta property="og:title" content="Example | Your Custom Page Title" />
<meta property="og:site_name" content="Example" />
<meta property="og:type" content="blog" />
<meta property="og:url" content="https://example.com/path/index.html" />
<meta property="og:description" content="Your Custom Page Description" />
<meta property="og:image" content="https://example.com/nice-image.jpg" />
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@example_com">
<meta name="twitter:title" content="Example | Your Custom Page Title">
<meta name="twitter:description" content="Your Custom Page Description">
<meta name="twitter:image" content="https://example.com/nice-image.jpg">
<script type="text/javascript">
window.location = "https://example.com/#/path/";
</script>
</head>
<body>
Your Custom Page Description
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment