Glossary

How Open Graph Tags Decide What Every Network Shows

Taras Shynkarenko
Taras Shynkarenko
Updated: 8 min read
How Open Graph Tags Decide What Every Network ShowsHow Open Graph Tags Decide What Every Network Shows

TL;DR, Quick Answer

8 min read

Open Graph tags are meta elements in a page's head that tell a social network which title, type, image and URL to show in a link preview. The protocol at ogp.me requires exactly four of them: og:title, og:type, og:image and og:url. Facebook, LinkedIn, Pinterest and Slack read them directly, while X checks its own twitter: properties first and falls back to Open Graph when they are absent.

What are Open Graph tags?

A page declares Open Graph tags as <meta> elements inside its <head>, and those elements tell a social network which title, type, image and URL to put in the link preview when somebody shares the page. The protocol homepage at ogp.me opens with the line "The Open Graph protocol enables any web page to become a rich object in a social graph." The mechanism is a crawler: the network fetches your URL, parses the meta elements, and builds a card from what it finds instead of guessing at your body copy. Write the four required tags into the head of every page you share, then run each network's debugger against the live URL.

A developer typing meta tags into a page's head section on a laptop.

Which Open Graph tags does the protocol require?

The Open Graph protocol requires four properties, and ogp.me names them as og:title, og:type, og:image and og:url. Each carries a one-line definition in the spec.

PropertyDefinition from ogp.meExample value
og:title"The title of your object as it should appear within the graph"Scheduling posts across nine networks
og:type"The type of your object, e.g., 'video.movie'"article
og:image"An image URL which should represent your object within the graph"https://example.com/preview.png
og:url"The canonical URL of your object that will be used as its permanent ID"https://example.com/guide

Beyond those four, ogp.me lists optional properties including og:description, og:site_name, og:locale, og:determiner, og:audio and og:video, plus structured children such as og:image:secure_url, og:image:type and og:image:alt. The spec also asks for an RDFa prefix on the root element, <html prefix="og: https://ogp.me/ns#">.

<meta property="og:title" content="Scheduling posts across nine networks" />
<meta property="og:type" content="article" />
<meta property="og:image" content="https://example.com/preview.png" />
<meta property="og:url" content="https://example.com/guide" />
<meta property="og:description" content="What each network reads before it draws a card." />

Which networks read Open Graph tags and which use their own?

Facebook, LinkedIn, Pinterest and Slack read og: properties directly, and X reads its own twitter: namespace first. That split is the practical problem when one page goes out to several networks, because a tag set that satisfies one crawler can leave another drawing a blank card.

DestinationWhat it readsSource
Facebookog: propertiesMeta's webmasters guide names og:url, og:title, og:description, og:image, og:type, og:locale, fb:app_id
LinkedInog: propertiesLinkedIn's help page: the source code "needs to comply with Open Graph Protocol (OGP)"
Pinterestog: properties or schema.orgPinterest's Rich Pins overview: "the most common formats are Open Graph and Schema.org"
Xtwitter: properties, falling back to og:X's Cards guide, archived, quoted below
Slackog: properties and X card metadataSlack's docs: unfurling "looks for common OpenGraph and X (formerly known as Twitter) Card metadata"

Two things follow. A network reads your tags only when the post carries a fetchable link, so a caption format that never renders a URL never triggers a crawl. And a network with its own namespace prefers it, which makes publishing one page everywhere a metadata problem before it is a scheduling problem. The same care applies as with any cross-posting workflow: the copy travels, the rendering does not.

Why does og:url need to be the canonical URL?

Meta's sharing guide defines og:url as "The canonical URL for your page. This should be the undecorated URL, without session variables, user identifying parameters, or counters." The protocol calls the same property a permanent ID, so every share of a tracked variant collapses onto the one address you declared. Set og:url to the clean canonical address, keep campaign parameters in the shared link and out of the tag, and read the campaign side separately when you track social media traffic.

The same guide defines og:title as "The title of your article without any branding such as your site name," because Facebook already prints the domain on the card.

How does X fall back from twitter: tags to og: tags?

X's card processor checks for the twitter: property first and uses the Open Graph equivalent when the twitter: one is missing. X no longer publishes its Cards guide, and the old developer URL now redirects to a generic overview page, so every quote here comes from the archived December 2023 capture of that guide and describes behaviour X last documented then. It stated the rule this way: "When the Twitter card processor looks for tags on a page, it first checks for the Twitter-specific property, and if not present, falls back to the supported Open Graph property." The one property with no Open Graph equivalent is twitter:card itself, described as "The card type, which will be one of 'summary', 'summary_large_image', 'app', or 'player'."

Two syntax details follow from that guide. X needs no RDFa prefix, and although its tags use name and content, "Twitter's parser will fall back to using property and content, so there is no need to modify existing Open Graph protocol markup if it already exists." On top of a correct Open Graph set, one extra tag covers X.

<meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:site" content="@yourhandle" />

How long do platforms cache what they scraped?

Facebook and X both cache the scrape, on different clocks. Meta's best practices page offers the Sharing Debugger for sites that "need to update them more often than the standard 24 hour update period." The archived Cards guide says "Content is cached by Twitter for 7 days after a link to a page with card markup has been published in a Tweet." Fix your tags before the link goes out, because after it goes out you are waiting on someone else's cache.

A hand scrolling a social media feed on a smartphone, the kind of screen a link preview card appears on.

How do you check what a crawler actually sees?

Each network publishes a debugger that fetches your URL as its own crawler and prints the tags it parsed. Meta's documentation says its Sharing Debugger "will show which meta tags the crawler scrapes as well as any errors or warnings," and the same run pre-caches your image. Point it at the exact URL you are about to post, not a staging copy, then repeat after any edit to the head.

The crawlers are identifiable in server logs and robots rules. Meta lists user agents including facebookexternalhit/1.1 and meta-externalagent/1.1, and X uses "the User-Agent of Twitterbot (with version, such as Twitterbot/1.0)." Its guide warns that "if a page with card markup is blocked, no card will be shown."

What goes wrong with Open Graph tags?

Four failure modes account for most blank or wrong previews, and none are visible in a browser. A blocked crawler is the first, and LinkedIn's help page names it: if an image meets the requirements and still does not appear, "your website may be blocking us from pulling the image or the image may be located on a protected directory or website." The second is placement, since Meta's crawler documentation states that "any Open Graph properties need to be listed before the first 1 MB of your website or app, or it will be cutoff." The third is a stale cache. The fourth is a relative image path, because og:image is defined as an image URL and a crawler on another host has no base to resolve one against.

AdaptlyPost
AdaptlyPost

Start 7-Day FREE Trial

All-platform analytics

Social Inbox

AI-powered assistant

Pinterest sits apart from all four, because Rich Pins treat your metadata as structured content and not only as a preview, covered on its own terms in this guide to Rich Pins. Getting the head right once is the cheapest part of social media optimization. When the same link goes to several destinations, adaptlypost publishes one post to multiple accounts at once, so the tag work stays on your page and the distribution happens in one place. The rendering still belongs to each network, which is the point to carry into any cross-posting strategy.

Four ways a preview breaks
Blocked crawlerRobots rules or the server keep the crawler from fetching the image
Late placementOpen Graph tags sit past the first 1 MB of the page and get cut off
Stale cacheThe network still shows what it scraped before your last edit
Relative image pathog:image has no base URL for another host to resolve against
Four failure modes account for most blank or wrong link previews, and none show up in a browser.

Frequently asked questions

Do I need og:description if the protocol does not require it?

ogp.me lists og:description as optional, so a page without it still satisfies the protocol. Meta's sharing guide describes it as the text shown below the title on Facebook, so skipping it hands the network a decision you could have made. Write it.

Can I use Open Graph tags and twitter: tags on the same page?

Yes, and X's archived Cards guide called that the intended setup: defining both "minimizes the amount of duplicate markup required to describe content and experience." The processor reads the twitter: property when it exists and the og: property when it does not. Adding twitter:card on top of a complete Open Graph set is enough for X.

What happens if og:url points somewhere other than the page itself?

The network builds its card for the address in og:url, which ogp.me defines as "The canonical URL of your object that will be used as its permanent ID." A mismatch sends every sharer to a different page from the one they were reading. Keep og:url equal to the canonical address of the page carrying the tag.

Why does my preview still show the old title after I fixed the tag?

Networks cache the scrape. Meta's best practices page refers to a "standard 24 hour update period" and offers the Sharing Debugger to refresh sooner, and X's archived Cards guide gave 7 days from the moment a link is published in a post. Run the relevant debugger, then re-share.

Does the html prefix attribute matter?

ogp.me specifies the RDFa prefix <html prefix="og: https://ogp.me/ns#"> as part of the protocol, so include it. X's Cards guide notes that no such markup is required for its own twitter: tags. Do not expect the prefix to fix a card that is failing for another reason.

What do networks do when og:image is missing?

The protocol defines no fallback, so the behaviour belongs to each network and its crawler. Slack's documentation describes classic unfurling as crawling the URL for Open Graph and X card metadata and rendering "some micro-approximation of the content," which is the honest description of what a network does with an incomplete set. Supply og:image and keep the choice out of a heuristic.

What goes in og:type if the page is not an article?

ogp.me defines og:type as the type of the object and gives video.movie as its example, so the value should match what the page actually is. The table in this guide uses article for a blog post, but that is only one of the values the protocol allows. Set og:type to the type that actually describes the object on the page.

Should og:title include my brand name?

Meta's sharing guide defines og:title as "the title of your article without any branding such as your site name," because Facebook already prints the domain on the card. Adding your brand name there just repeats what the network shows on its own. Keep og:title to the title alone and let the network handle the domain.

Does a network build a preview from a post with no link?

A network reads your tags only when the post carries a fetchable link, so a caption format that never renders a URL never triggers a crawl. Without a link there is nothing for the crawler to fetch, no matter how complete the rest of your tags are. Put the URL in the post itself, not only in an image or the caption text.

How do I spot a network's crawler in my server logs?

Meta lists user agents that include facebookexternalhit/1.1 and meta-externalagent/1.1, both identifiable in server logs and robots rules. X uses the user agent of Twitterbot, with a version such as Twitterbot/1.0. Checking for these strings shows whether the crawler reached the page at all, since X's guide warns that a blocked page shows no card.

Was This Article Helpful?

Let us know what you think!

See us more often in Google

One click marks AdaptlyPost as a preferred source, so our articles sit higher in your Top Stories, AI Mode, and AI Overviews.

Before you go...

AdaptlyPost

AdaptlyPost

Schedule your content across all platforms

Manage all your social media accounts in one place with AdaptlyPost.

All-platform analytics

Social Inbox

AI-powered assistant

Related Glossary Terms

Related Articles