← 提示词库 Meta/muse-agent/skills/artifacts/references/social-embeds.md 原文 md
🌐 中英双语对照

description: Embedding social posts and reels (Instagram) and other third-party rich content in a web page. Which platforms can be framed, the exact embed markup, and the link-out degrade for surfaces that block iframes.
builders: web

Social posts, reels, and rich embeds / 社交帖子、reel 与富媒体嵌入

Read this when a page should show a social post, reel, or other third-party
rich content (a video, a player, an interactive widget) rather than just link
to it.

当页面需要展示社交帖子、reel 或其他第三方富内容(视频、播放器、交互式小部件),而不只是链接到它时,请阅读本文。

What can and cannot be framed / 哪些内容可以嵌入 frame,哪些不可以

The markup / 标记写法

A card with a visible permalink anchor as the base layer, and the embed iframe
on top:

以一个可见的永久链接锚点作为底层卡片,并在其上叠加 embed iframe:

<div class="embed-card"><!-- fixed-height box; reels read best near 9/16 -->
  <iframe src="https://www.instagram.com/reel/{id}/embed/"
          sandbox="allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox"
          referrerpolicy="no-referrer" loading="lazy" scrolling="no"></iframe>
  <a href="{permalink}" target="_blank" rel="noopener">Watch on Instagram</a>
</div>

Where it renders / 在哪里可以渲染

The published artifact page and its share link allow third-party iframes, so
the embed plays there. The in-chat preview and some host frames block all
iframes; there your card degrades to the anchor. Design for that: the embed is
an enhancement layered on a link-out card that is complete by itself, never the
only content in the slot.

已发布的工件页面及其分享链接允许第三方 iframe,因此嵌入内容可以在那里播放。聊天内预览和部分宿主 frame 会屏蔽所有 iframe;此时卡片退化为锚点链接。要为这种情况做设计:嵌入只是叠加在链接跳转卡片之上的增强层,卡片本身必须独立完整,嵌入永远不应是该位置的唯一内容。

Media bytes / 媒体资源