如何确保链接支持Twitter预览?

rad*_*vus 11 twitter preview

首先,请注意我搜索了一个SocialMediaStackExchange来询问这个问题,但似乎没有.

这就是我想知道的.当向Twitter发布推文时,如果它是YouTube链接或特定网站的链接,则twitter将显示扩展功能,用户可以单击该功能以在Twitter界面中预览媒体内容.

有没有人知道这是由Twitter决定还是有一些方法我可以改变我的网站以启用Twitter上的预览?

当我在推特上发布人们可以预览文章第一部分内容的博客文章时,我想这样做.这是一个例子:(只需添加链接,显示所显示的预览内容)在这种情况下,它是InfoWorld上的一篇文章.


Web链接可创建内容预览


Twitter上有一个链接解释扩展内容,但不是如何实现它. https://blog.twitter.com/2012/experience-more-with-expanded-tweets

Ter*_*den 12

你可能想看看" Twitter卡 ".它们设置起来非常简单.您可以在页面标题中添加几行代码,验证您的网站(自动流程),然后您就可以了.

例如,这是我的推文之一"预览"内容https://twitter.com/edent/status/516544061495193601

额外的HTML代码只是:

<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:creator" content="@edent">
<meta name="twitter:site" content="@edent">
<meta name="twitter:title" content="Tim Berners-Lee and the Freedom of The City">
<meta name="twitter:description" content="Last week, I had the privilege of being invited into the Guildhall to watch Tim Berners-Lee receive the Honorary Freedom of the City.  I was one of a dozen bloggers and tweeters asked to live tweet th">
<meta name="twitter:image:src" content="https://shkspr.mobi/blog/wp-content/uploads/2014/09/TimBL-Least-Well-Dressed-435x375.jpg">
<meta name="twitter:image:width" content="280">
<meta name="twitter:image:height" content="150">
Run Code Online (Sandbox Code Playgroud)

不同风格的卡片有不同类型的预览 - 视频,图像,应用程序安装等.