Facebook's share-preview crawler does not read a numeric Page ID; it reads Open Graph meta tags from your page's HTML head. For most share previews, the Graph API Page ID lookup is the wrong task — there is no og:page_id property in the Open Graph Protocol, and Facebook's crawler never requests one from your page. What the crawler does request is the four required Open Graph properties: og:title, og:type, og:image, and og:url, delivered as meta elements inside the head of the canonical page. The Open Graph Generator builds exactly that protocol-only block from safe inputs and runs entirely in the browser, so no app registration, access token, or Graph API call is required. A numeric Page ID only becomes necessary when you want to programmatically publish posts, read comments, or otherwise manage a Facebook Page — actions that fall under authenticated Graph API calls rather than share previews. If the goal is share previews on Facebook, LinkedIn, Slack, Discord, or any other Open Graph consumer, the correct path is well-formed Open Graph metadata on your own page, validated by each platform's debugger after deployment.

Why a Graph API Page ID Is Not What Share Previews Read
When a URL is pasted into a Facebook composer, the platform dispatches a crawler to the destination. That crawler fetches the page, parses the HTML head, and reads any og:* meta elements it finds. The four required Open Graph properties — og:title, og:type, og:image, and og:url — together describe the shareable graph object, and that is the complete contract for what the preview shows. There is no field on the protocol side that accepts a Facebook Page ID; the protocol is intentionally page-driven so any site, with or without a Facebook presence, can produce a share preview.
Graph API endpoints such as /{page-username}?fields=id or /{page-id}?fields=link return numeric identifiers, but those numbers cannot be plugged into a meta tag. They are useful for app tokens, posting automation, comments retrieval, and Page management — none of which is what a share preview consumes. Treating the Page ID lookup as the gateway to share previews is a category mismatch that costs time on app review, access tokens, and permissions that the crawler never reads anyway.
What the Open Graph Protocol Actually Requires
The Open Graph Protocol defines four required basic properties, and the generator emits them first, in a stable order, every time:
- og:title — names the share object. Trimmed, length-bounded, and escaped for an HTML attribute so ampersands, quotes, and angle brackets cannot break the meta element.
- og:type — classifies the object. The generator deliberately limits this to website or article; music, video, profile, and other structured types require additional type-specific fields that the focused form does not expose.
- og:image — supplies a representative visual. Must be an absolute HTTP or HTTPS URL without embedded credentials or fragments.
- og:url — identifies the permanent object. Must also be absolute HTTP or HTTPS, fragment-free, and credential-free.
Missing any required value blocks the output rather than producing an incomplete preview block. The protocol ecosystem allows more types and more properties, but those belong in a specialized implementation. A valid Open Graph block still does not guarantee how any post appears — sharing systems can crop images, truncate text, ignore fields, choose cached data, or apply account-level policies. Treat the platform debuggers, not the protocol spec alone, as the rendering source of truth.
Build the Share Preview Metadata With the Open Graph Generator
The generator performs all work in the browser, validates inputs at runtime, and returns a property-based meta block in a stable order. Follow these three steps to ship a working preview.
- Enter accurate object text, choose website or article, and provide public fragment-free page and image URLs. The browser URL parser normalizes them; the tool does not fetch either endpoint. A fragment-free object URL keeps shares of the same resource from splitting across client-side anchors, and credential rejection avoids copying user information into public metadata.
- Generate the required and optional Open Graph properties, then copy the protocol-only block into the canonical page head. The generator emits the four required properties first, then any optional og:description, og:site_name, and og:locale you supplied. Optional text is trimmed, length-bounded, rejected when it contains control characters, and escaped for an HTML attribute. The object type is re-validated at runtime even though the form uses a select control, so altered or programmatic input cannot smuggle an unsupported type through.
- Inspect delivered source and use each target platform's current preview debugger to check crawl access, image handling, and cache refresh. Build tools can reorder, overwrite, or add conflicting properties, so the deployed HTML head is the canonical check. After the platform's crawler has read the page once, it may continue serving an older cached preview even after the metadata changes — each service documents its own cache refresh behavior.
Required vs. Optional Properties at a Glance
The following table summarizes what the generator emits, in the order it emits them, and how each value is handled. All attribute values are escaped, all URLs are normalized, and the four required properties appear before any optional ones.
| Property | Required? | Purpose | Generator behavior |
|---|---|---|---|
| og:title | Yes | Names the share object | Trimmed, length-bounded, HTML-escaped |
| og:type | Yes | Classifies the object | Limited to website or article; re-checked at runtime |
| og:image | Yes | Representative visual | Absolute HTTP(S), credential-free, fragment-free; not fetched |
| og:url | Yes | Canonical object URL | Absolute HTTP(S), credential-free, fragment-free |
| og:description | Optional | Preview summary text | Trimmed, control characters rejected, HTML-escaped |
| og:site_name | Optional | Names the larger site | Trimmed, length-bounded, HTML-escaped |
| og:locale | Optional | language_TERRITORY (e.g. en_US) | Conservative two-letter language plus two-letter territory |
The locale validator accepts one conservative two-letter language and two-letter territory shape on purpose. Alternate locales and script subtags need additional protocol properties and editorial decisions outside this focused form, so the generator rejects anything more elaborate rather than producing silently wrong values.
Verify Crawl Access, Image Handling, and Cache State
The generator cannot verify HTTP status, MIME type, image dimensions, byte size, aspect ratio, redirects, robots controls, authentication, or platform cache state. Each social service applies its own image requirements, and a passing protocol block on your end says nothing about how the platform will render it on the other end. Treat the share preview pipeline as two stages: the page you ship, and the cache each platform keeps.
After the meta block is in the canonical page head, open each target platform's current preview debugger, paste the page URL, and request a fresh fetch. Compare the rendered preview against the deployed source — title, description, image, and URL. If the preview still shows old content, the platform has cached an earlier version; consult that service's documentation for its cache refresh behavior and trigger a manual refresh where supported. If the preview is blank or wrong, the most common causes are a blocked crawler, an image that returns a non-2xx status, an image with the wrong MIME type, or an image that fails the platform's minimum dimensions. The protocol block is correct by construction; the platform preview is a separate verification step.
Common Mistakes That Keep Previews Broken
Most preview failures come from inputs that pass the generator's validation but fail when a real crawler hits a real page. Watch for these patterns:
- Fragment or credentials in the URL. A #section or ?token=... in og:url or og:image is normalized away by the generator; if you bypass the generator and write the meta tag by hand, the fragment stays in and breaks the canonical signal.
- Image not publicly fetchable. The generator validates URL shape without fetching. Behind-login, hotlink-protected, robots-disallowed, or non-2xx images all pass the form but fail the platform crawler.
- Image wrong dimensions or MIME type. Each platform enforces its own minimums. A passing og:image URL on the protocol side does not satisfy the platform's byte-size, aspect-ratio, or file-format rules.
- Stale cache. Platforms can keep showing an older preview after metadata changes. Each service has its own refresh cadence and manual trigger.
- Misleading content. A title, description, or image that does not match the visible page can earn a click and disappoint the visitor. Write metadata that reflects what the page actually shows.
If you find yourself reaching for the Graph API to "get a Page ID" before publishing a page, step back: the API path is for posting and management, and the Open Graph metadata path is for share previews. A single run through the Open Graph Generator — followed by a debugger check on each target platform — covers what the Page ID lookup was never going to solve. For the narrower question of whether you still need an API token at all, see the Graph API access walkthrough.
For a deeper look, see QR Code Generator API Alternative: No Setup, No Quotas.