如何向 AMP 故事添加社交分享描述和图像?

问题描述

我正在创作一个 AMP 故事。当我将链接复制并粘贴到 Facebook 或 Twitter 帖子中时,它会提取正确的元数据并显示标题、描述和图像。但是,如果我使用内置社交按钮,它只会拉取标题标签和 URL。如果用户通过 AMP 的内置方法分享,我如何确保描述和图片会出现?

这是我复制和粘贴链接时的样子: A twitter post showing a Twitter card with a title,image and description

这是我点击 AMP 的 Twitter 分享按钮时的样子: A Twitter post showing only a URL and title

这是我的头部标签

 <Meta charset="utf-8">
<title>Comic: How the COVID vaccine will save your life</title>
<link rel="canonical" href="index.html">
<Meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<Meta name="description" content="How can COVID vaccines save your life? We made a comic to explain." />
<Meta name="news_keywords" content="vaccine comic,mRNA,how Pfizer Moderna vaccines work,what is mRNA,easy to understand vaccine,explain vaccine to kids" />
<Meta property="og:title" content="How the COVID vaccine will save your life." />
<Meta property="og:site_name" content="ommitted-for-stack-overflow" />
<Meta property="og:url" content="https://projects.nj.com/vaccine-comic" />
<Meta property="og:description" content="How can COVID vaccines save your life? We made a comic to explain." />
<Meta property="og:type" content="article" />
<Meta property="og:locale" content="en_US" />
<Meta property="og:image" content="https://projects.nj.com/vaccine-comic/assets/vaccine_comic_Facebook.png"/>
<Meta property="og:image:type" content="image/png" />
<Meta property="og:image:width" content="600" />
<Meta property="og:image:height" content="315" />
<Meta name="twitter:card" content="summary_large_image" />
<Meta name="twitter:site" content="https://twitter.com/njdotcom" />
<Meta name="twitter:creator" content="omitted-for-stack-overflow" />
<Meta name="twitter:title" content="How the COVID vaccine will save your life." />
<Meta name="twitter:description" content="How can COVID vaccines save your life? We made a comic to explain." />
<Meta name="twitter:image:src" content="https://projects.nj.com/vaccine-comic/assets/vaccine_comic_Twitter.png" />

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...