Open Graph is a protocol, created by Facebook in 2010, that uses meta tags in a web page’s HTML to control the title, description and image social media platforms show when someone shares a link. For marketers, it’s how you decide what people see before they click.​​ ​

How does Open Graph work?​​ ​

When someone shares a URL, crawlers from Facebook, LinkedIn and X (formerly known as Twitter) read the og: meta tags in the page’s <head>. They use those tags to build the preview card. Without them, platforms guess at the title, description and image.​​ ​

The Open Graph protocol lists four required tags for every page:​​ ​

  • og:title: The headline that appears in the preview​​ ​
  • og:type: The content type, such as article or website​​ ​
  • og:image: The URL of the image that appears in the preview​​ ​
  • og:url: The canonical URL of the page​​ ​

og:description is a common optional tag that sets the preview’s summary text. Test your previews with Facebook’s Sharing Debugger or LinkedIn’s Post Inspector before you publish.​​ ​

Benefits of Open Graph​​ ​

Open Graph puts you in control of how your shared links look, and your previews stay on brand across every platform that reads the tags. Pair your og:image with the right social media image sizes so it displays the way you planned. A strong image and headline earn more clicks and more word-of-mouth shares.​​ ​

How to use Open Graph​​ ​

You can add Open Graph tags by hand or with a plugin or content management system (CMS). Follow these steps to set them up:​​ ​

  1. Open your page’s HTML. Find the <head> section of the page you want to control. In a CMS like WordPress, an SEO plugin gives you fields for each tag, so you don’t need to edit code.​​ ​
  2. Add the four required tags. Include og:title, og:type, og:image and og:url. Here’s an example:​​ ​

<meta property=”og:title” content=”Your page title” />​​ ​
<meta property=”og:type” content=”article” />​​ ​
<meta property=”og:image” content=”https://example.com/image.jpg” />​​ ​
<meta property=”og:url” content=”https://example.com/your-page” />​​ ​

  1. Add an og:description. Write one or two sentences that tell people what they’ll find on the page.​​ ​
  2. Choose the right image. Use a high-resolution image that matches the recommended size for the platforms you share on, and use a full URL, not a relative path.​​ ​
  3. Test before you publish. Run your URL through Facebook’s Sharing Debugger or LinkedIn’s Post Inspector to preview the card and clear any cached versions.​​ ​

Start a free trial to schedule and publish your link posts with Sprout Social’s publishing tools.​​ ​