squirrelscan
GitHub

twitter:card: the card types and the Open Graph fallback

A page with no twitter:card, an unrecognised type, or a large-image card with no image. squirrel checks the type and the fallback.

What a Twitter card is

<meta name="twitter:card"> chooses how a link renders on X. Four types are defined: summary for a small square thumbnail, summary_large_image for a wide banner, player for embedded media, and app for a mobile app listing.

For a summary or summary_large_image card the other twitter: tags are optional, because X falls back to Open Graph for the title, description and image. A player or app card is different: each needs its own tags, which Open Graph has no equivalent for. That is why a page with good Open Graph tags and no twitter:card is a reasonable configuration, and why this rule reports at info severity rather than warning.

What squirrel checks

The rule runs on every crawled page against the parsed twitter: and og: values. It emits one check named twitter-card:

  • At info status with the message No Twitter card specified, will use Open Graph fallback when there is no twitter:card but both og:title and og:description are present.
  • Warning with the message No Twitter card or Open Graph tags for Twitter sharing when there is no card and the Open Graph fallback is incomplete.
  • Warning with the message Invalid Twitter card type: <value> when the card value is not one of summary, summary_large_image, app or player. The four valid types are listed as items.
  • Warning with the message summary_large_image card requires an image when that card type is declared and neither twitter:image nor og:image is present.
  • Passing with the message Twitter card configured: <type>.

The card type is matched exactly, so a value with different casing or surrounding whitespace is reported as invalid. Only summary_large_image has its image requirement checked; a summary card with no image passes.

How to fix it

<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Configuring the build cache" />
<meta name="twitter:description" content="How the build cache stores compiled output between runs." />
<meta name="twitter:image" content="https://example.com/og/build-cache.png" />

Note that these use name, not property, which is the opposite of Open Graph. For a summary card, declaring twitter:card alone and letting the rest fall back to Open Graph is enough and keeps one set of values to maintain. A player or app card needs its own full set.

The common false positive is a page deliberately relying on the fallback. That is reported at info status, which is the correct outcome and not something to fix.

Rule IDcore/twitter-cards
CategoryCore SEO
ScopePer-page
Severityinfo
Weight3/10

Enable / disable

Disable this rule

[rules]
disable = ["core/twitter-cards"]

Disable all Core SEO rules

[rules]
disable = ["core/*"]

Enable only this rule

[rules]
enable = ["core/twitter-cards"]

enable replaces the default ["*"], so this is the only rule selected. Leave disable out: a rule that matches any disable pattern is skipped even when enable names it. Only an enabled setting under a rule’s own [rule_options] table overrides both lists.

Core SEO findings ship in every audit next to the performance, security and agent experience rules. See Fix SEO issues with AI for how an agent works through a report.

References

Check your site

Run squirrel audit https://example.com and open the Core SEO section of the report. Each page reports the card type it declared, or that it has none. Signed-out local audits need no account and cost nothing. Signed-in audits spend credits.

Type to search…

↑↓ navigate↵ openesc close