← 返回
未分类 中文

twitter-cards

When the user wants to add or optimize Twitter Card metadata for X (Twitter) link previews. Also use when the user mentions "Twitter Card," "twitter:card," "...
当用户想要为 X(Twitter)链接预览添加或优化 Twitter Card 元数据时使用,也适用于用户提及“Twitter Card”、“twitter:card”等关键词的场景。
kostja94 kostja94 来源
未分类 clawhub v1.1.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 338
下载
💾 1
安装
1
版本
#latest

概述

SEO On-Page: Twitter Cards

Guides implementation of Twitter Card meta tags for X (Twitter) link previews. Twitter falls back to Open Graph if Twitter-specific tags are missing; add both for best results.

When invoking: On first use, if helpful, open with 1–2 sentences on what this skill covers and why it matters, then provide the main output. On subsequent use or when the user asks to skip, go directly to the main output.

Scope (Social Sharing)

  • Twitter Cards: X-specific meta tags; control how links appear when shared on X/Twitter

Card Types

TypeUse case
----------------
summarySmall card with thumbnail
summary_large_imageLarge prominent image (recommended; 1200×675px)
appMobile app promotion
playerVideo/audio content

Recommended Tags (summary_large_image)

<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Your Title">
<meta name="twitter:description" content="Your description">
<meta name="twitter:image" content="https://example.com/image.jpg">
<meta name="twitter:site" content="@yourusername">
<meta name="twitter:creator" content="@authorusername">
<meta name="twitter:image:alt" content="Alt text for image">
TagGuideline
----------------
twitter:cardRequired; summary_large_image for most pages
twitter:titleMax 70 chars; concise title
twitter:descriptionMax 200 chars; summary
twitter:imageAbsolute URL; unique per page
twitter:site@username of website
twitter:creator@username of content creator
twitter:image:altAlt text; max 420 chars; accessibility

Image Requirements

ItemGuideline
-----------------
Aspect ratio2:1
Minimum300×157 px
Recommended1200×675 px
Max4096×4096 px
File sizeUnder 5MB
FormatsJPG, PNG, WebP, GIF (first frame only); SVG not supported

Common Mistakes

  • Missing Twitter Card tags (Twitter won't display images properly without them)
  • Using relative image URLs instead of absolute https://
  • Images too small or wrong aspect ratio
  • Title/description too long (gets truncated)

Implementation

Next.js (App Router)

export const metadata = {
  twitter: {
    card: 'summary_large_image',
    title: '...',
    description: '...',
    images: ['https://example.com/twitter.jpg'],
    site: '@yourusername',
    creator: '@authorusername',
  },
};

HTML (generic)

<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Your Title">
<meta name="twitter:description" content="Your description">
<meta name="twitter:image" content="https://example.com/image.jpg">
<meta name="twitter:site" content="@yourusername">
<meta name="twitter:image:alt" content="Alt text">

Testing

Related Skills

  • social-share-generator: Share buttons use Twitter Cards for X previews when users share; Cards must be set for share buttons to show proper previews
  • open-graph: OG tags; Twitter falls back to OG if Twitter tags missing
  • title-tag: Title tag often mirrors twitter:title
  • meta-description: Meta description often mirrors twitter:description
  • page-metadata: Hreflang, other meta tags
  • twitter-x-posts: X post copy and engagement (different from link previews)

版本历史

共 1 个版本

  • v1.1.0 当前
    2026-05-07 15:29 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

youtube-seo

kostja94
用于优化YouTube视频搜索排名、编写视频描述或提升频道曝光度;用户提及“YouTube”时亦可使用。
★ 0 📥 1,244
data-analysis

email-marketing

kostja94
当用户想要规划邮件营销、EDM、Newsletter 策略或邮件送达率时使用,也适用于用户提及“邮件营销”“EDM”“Newsletter”等关键词。
★ 0 📥 1,517
content-creation

translation

kostja94
当用户需要翻译内容、创建翻译工作流、管理术语或优化翻译质量时使用;也适用于用户提及相关场景。
★ 0 📥 2,757