Facebook Meta Tags: Setup, Validation & Debugging

Facebook uses Open Graph tags to generate link previews in the News Feed, Messenger, and ads. This guide covers Facebook-specific requirements, common pitfalls, and how to debug preview issues.

Facebook-Specific OG Requirements

Facebook requires these OG tags for a proper link preview:

<meta property="og:title" content="Your Page Title" />
<meta property="og:description" content="A short description of your content." />
<meta property="og:image" content="https://example.com/image.jpg" />
<meta property="og:url" content="https://example.com/page/" />
<meta property="og:type" content="website" />

Without og:image, Facebook may pull a random image from your page or show no image at all. Without og:url, Facebook cannot consolidate share counts.

fb:app_id and fb:admins

fb:app_id — The Facebook Sharing Debugger shows a warning if fb:app_id is missing. This tag is effectively deprecated for most use cases. It was originally required to access Facebook Insights for shared links, but that feature has been discontinued.

<!-- Safe to omit. If you see a warning, you can ignore it. -->
<meta property="fb:app_id" content="your_app_id" />

The warning does not affect how your link preview renders. You do not need to create a Facebook App just to suppress it.

fb:admins — A legacy tag that granted specific Facebook users admin access to insights for a domain. No longer necessary.

<!-- Legacy — do not use -->
<meta property="fb:admins" content="facebook_user_id" />

Image Requirements

Facebook is strict about image specifications. The recommended size is 1200 x 630 pixels with a 1.91:1 aspect ratio. The minimum size is 200 x 200 pixels, and the maximum file size is 8 MB. Supported formats include JPEG, PNG, GIF, and WebP. Image URLs must be absolute (HTTPS preferred).

Images below 600 x 315 pixels will render as a small square thumbnail instead of a large preview card. Always aim for at least 1200 x 630 to get the large card format.

<meta property="og:image" content="https://example.com/images/preview.jpg" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:image:type" content="image/jpeg" />
<meta property="og:image:alt" content="Description of the preview image" />

Specifying og:image:width and og:image:height lets Facebook render the card layout before downloading the image, preventing layout shifts.

Facebook Crawler Behavior

Facebook's crawler identifies itself as facebookexternalhit/1.1. Key behaviors:

No JavaScript execution. The crawler reads raw HTML only. If your OG tags are injected client-side via JavaScript, Facebook will not see them.

5-second timeout. If your server takes longer than 5 seconds to respond, the crawl fails.

Follows redirects. Up to 5 redirects, then gives up.

Respects robots.txt for the facebookexternalhit user agent. Blocking this agent means no link previews.

IP ranges. Facebook crawls from multiple IP ranges. Do not whitelist by IP; use the user agent string instead.

Caching and Cache Clearing

Facebook caches scraped OG data aggressively:

Cache duration: approximately 30 days from the last scrape.

HTTP vs HTTPS: Cached separately. http://example.com/page and https://example.com/page have independent caches.

First share triggers a scrape. The first person to share your URL triggers the initial crawl. Subsequent shares within the cache window use the cached data.

To force a cache refresh, use the Sharing Debugger or the Graph API (see below).

Using the Facebook Sharing Debugger

The Facebook Sharing Debugger is at developers.facebook.com/tools/debug/. You must be logged into a Facebook account to use it.

Step-by-step: Go to the Sharing Debugger. Enter your URL in the input field. Click Debug. Review the parsed OG tags, warnings, and the preview card. If you have updated your tags and the preview is stale, click Scrape Again. Click Scrape Again a second time if the first scrape still shows old data — Facebook sometimes needs two attempts.

The debugger shows all OG tags it found on your page, warnings for missing or invalid tags, a preview of how the link will appear in the feed, and the time of the last scrape.

Programmatic Cache Clearing

Use the Facebook Graph API to clear the cache programmatically. This is useful after deploying content changes or in CI/CD pipelines.

curl -X POST \
  "https://graph.facebook.com/v21.0/" \
  -d "id=https://example.com/your-page/" \
  -d "scrape=true" \
  -d "access_token=YOUR_APP_ACCESS_TOKEN"

The access token can be an App Token (no user login required): APP_ID|APP_SECRET. You can generate this from your Facebook App dashboard.

For batch cache clearing across multiple URLs:

#!/bin/bash
TOKEN="YOUR_APP_ID|YOUR_APP_SECRET"
URLS=(
  "https://example.com/"
  "https://example.com/blog/"
  "https://example.com/about/"
)

for url in "${URLS[@]}"; do
  curl -s -X POST "https://graph.facebook.com/v21.0/" \
    -d "id=$url" \
    -d "scrape=true" \
    -d "access_token=$TOKEN"
  echo " => Scraped: $url"
done

Rate limit: approximately 50 scrape requests per minute per app.

Common Debugger Errors

Missing Required Property: og:image — No og:image tag found. Fix: add an og:image meta tag with an absolute URL.

og:image could not be downloaded — Image URL returns 404, times out, or is blocked. Fix: verify the image URL loads in a browser; check server response time.

og:image is too small — Image dimensions below 200x200. Fix: use at least 1200x630 pixels.

Share rate limit reached — Too many scrape requests. Fix: wait and try again in a few minutes.

Inferred Property — Facebook guessed a value instead of reading it from a tag. Fix: add the explicit OG tag to stop Facebook from guessing.

Object Missing a Required Valueog:title, og:type, or og:url is missing. Fix: add the missing required tag.

fb:app_id hasn't been included — No fb:app_id on the page. Safe to ignore; does not affect preview rendering.

Could not parse og:image — Image format is unsupported or corrupt. Fix: re-export the image as JPEG or PNG; verify the file is not corrupt.

Redirect Path Too Long — More than 5 redirects before reaching the final URL. Fix: reduce your redirect chain.

Article-Specific Properties

For blog posts, news articles, and editorial content, set og:type to article and add these properties:

<meta property="og:type" content="article" />
<meta property="article:published_time" content="2025-06-15T09:00:00Z" />
<meta property="article:modified_time" content="2025-07-01T14:30:00Z" />
<meta property="article:author" content="https://example.com/authors/jane-doe/" />
<meta property="article:section" content="Technology" />
<meta property="article:tag" content="JavaScript" />
<meta property="article:tag" content="Web Development" />

article:author should be a URL to the author's profile page (or their Facebook profile URL). article:published_time and article:modified_time use ISO 8601 format. You can include multiple article:tag entries.

Facebook uses article:published_time to display the publication date in the link preview, which helps establish content freshness.

Minimal Working Example

Here is a complete, minimal example with all required OG tags and article properties:

<head>
  <meta charset="utf-8" />
  <title>Build a REST API | Dev Tutorials</title>

  <!-- Required OG Tags -->
  <meta property="og:title" content="Build a REST API with Node.js" />
  <meta property="og:description" content="Production-ready REST API tutorial with Express and PostgreSQL." />
  <meta property="og:type" content="article" />
  <meta property="og:url" content="https://devtutorials.com/blog/rest-api/" />
  <meta property="og:image" content="https://devtutorials.com/images/rest-api-og.jpg" />
  <meta property="og:image:width" content="1200" />
  <meta property="og:image:height" content="630" />

  <!-- Article Properties -->
  <meta property="article:published_time" content="2025-06-15T09:00:00Z" />
  <meta property="article:author" content="https://devtutorials.com/authors/jane-doe/" />
</head>

Quick Reference

og:title — Required. Max ~88 characters displayed.

og:description — Recommended. Max ~300 characters displayed.

og:image — Required. 1200x630 recommended, min 200x200.

og:image:width — Recommended. Prevents layout shift.

og:image:height — Recommended. Prevents layout shift.

og:image:alt — Recommended. Accessibility.

og:url — Required. Canonical URL.

og:type — Required. website, article, profile, etc.

og:site_name — Optional. Site-level name.

og:locale — Optional. Defaults to en_US.

fb:app_id — Not required. Warning is safe to ignore.

article:published_time — Optional. ISO 8601 datetime.

article:modified_time — Optional. ISO 8601 datetime.

article:author — Optional. URL to author profile.

article:section — Optional. Content category.

article:tag — Optional. Multiple allowed.

FAQ

Facebook caches OG data for approximately 30 days. Click "Scrape Again" in the Sharing Debugger to force a re-crawl. If the data is still stale after one scrape, click "Scrape Again" a second time. For programmatic clearing, use the Graph API scrape endpoint.

No. The fb:app_id warning in the Sharing Debugger does not affect how your link preview renders. It was previously needed for Facebook Domain Insights, which has been discontinued. Your link previews will display correctly without it.

Your image is likely below 600 x 315 pixels. Facebook uses a small square thumbnail layout for images that do not meet the minimum dimensions for the large card format. Use images at least 1200 x 630 pixels for the large preview card.

No. The facebookexternalhit crawler reads raw HTML only. OG tags injected by client-side JavaScript (React, Vue, Angular) will not be detected. Use server-side rendering (SSR), static site generation (SSG), or a prerendering service to ensure your OG tags are in the initial HTML response.

After clicking "Scrape Again" or using the Graph API scrape endpoint, the update is immediate. Without manual intervention, the cache persists for approximately 30 days from the last scrape.

Check Your Facebook Meta Tags

See exactly how your link will look on Facebook before you share it.

  • Preview on Facebook, LinkedIn, Twitter/X, WhatsApp, iMessage, and more
  • No sign-up required
  • Live fetch — always see the latest version, no cache