我已经按照Optimize Tweets with Cards中的指南进行操作,但是它不能像将我的图像和说明放入卡片中以与他人共享一样。
我想在Twitter卡中共享我的网页。
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="summary" />
<meta name="twitter:creator" content="summary" />
<meta name="twitter:image" content="https://stackoverflow.com/questions/56339282/how-to-share-my-webpage-to-twitter-in-a-card/are_6b65b534.jpg" />
<meta name="twitter:description" content="@ViewBag.Description" />
当我将指南代码放在网页中时,共享网页时我仍然只获得一个网址。
感谢您的帮助。
答案 0 :(得分:1)
您必须声明图像的完整URL才能起作用。在此处进行测试:https://cards-dev.twitter.com/validator
答案 1 :(得分:0)
请添加属性属性,例如:
<meta property="og:url" content="http://bits.blogs.nytimes.com/2011/12/08/a-twitter-for-my-sister/" />
<meta property="og:title" content="A Twitter for My Sister" />
<meta property="og:description" content="In the early days, Twitter grew so quickly that it was almost impossible to add new features because engineers spent their time trying to keep the rocket ship from stalling." />
<meta property="og:image" content="http://graphics8.nytimes.com/images/2011/12/08/technology/bits-newtwitter/bits-newtwitter-tmagArticle.jpg" />
请使用twitter优化带有卡的推文中的示例。另外,请尝试添加图像的完整路径(例如示例)和描述标记中的完整内容。