A Guide to Using Open Graph Tags

By March 21, 2018

What are Open Graph Tags?

Facebook introduced Open Graph Tags in 2010. It promotes integration between Facebook and other websites by allowing them to become rich “graph” objects with the same functionality as other Facebook objects. Put simply, a degree of control is possible over how information travels from a third-party website to Facebook when a page is shared (or liked, etc.). In order to make this possible, information is sent via Open Graph meta tags in the part of the website’s code.

Note: Open Graph Protocol, is the most common way that the properties are defined. Facebook crawls the content of a given URL to determine the properties to be included for sharing. You can explicitly define the properties by including og:tags in the head code of your page; otherwise, Facebook will infer the properties after it completes the page crawl on a given URL. ShareThis then uses those properties to assemble the share box for the service selected; it uses these properties for most services supported by ShareThis, including Twitter, LinkedIn and Pinterest, along with Facebook.

Here is an example of the meta properties and how it will relate on the front end of the sharing button:

<head>
<meta property="og:title" content="Join the best company in the world!" />
<meta property="og:url" content="http://www.sharethis.com" />
<meta property="og:image" content="http://sharethis.com/images/logo.jpg" />
<meta property="og:description" content="ShareThis is its people. It's imperative that we hire smart,innovative people who can work intelligently as we continue to disrupt the very category we created. Come join us!" />
<meta property="og:site_name" content="ShareThis" />
</head>

 

sharethis-open-graph-tags

WordPress Plugin

For those who have downloaded our ShareThis WordPress plugin, we have an alternative option that can make setting up open graph tags a breeze. We love using Yoast’s SEO plugin which makes it extremely easy to setup your sharing properties, they include a section within the post page that allows you to edit the properties on the go!

For more details on how to use their plugin, we recommend reading this article:
https://yoast.com/wordpress-seo/