3
我希望用户在Twitter上分享我的网站页面。我有一个按钮,如下: -在Twitter上共享没有显示图片的缩略图
<a href="http://twitter.com/intent/tweet?text={{title}}&url=http://{{request.get_host}}/ad/{{slug}},{{id}}" target="_blank"></a>
我的meta标签如下: -
<meta property="og:type" content="website" />
<meta property="og:title" content="{{title}}" />
<meta property="og:description" content="{{description}}" />
<meta property="og:image" itemprop="image primaryImageOfPage" content="http://{{request.get_host}}{{images.0}}" />
<meta property="og:url" content="http://{{request.get_host}}/ad/{{slug}},{{id}}"/>
<meta name="twitter:card" content="summary">
<meta name="twitter:domain" content="{{request.get_host}}"/>
<meta name="twitter:title" property="og:title" itemprop="title name" content="{{title}}" />
<meta name="twitter:description" property="og:description" itemprop="description" content="{{description}}" />
This是我点击共享链接后,我得到什么。 我的预期(理想)结果应该像this。我错过了什么?
This是我想分享的页面。
感谢Andy的帮助。那么,我检查了它,说明字段实际上是空的。有没有一种方法可以绕过这一点,还是强制提供描述字段? – PythonEnthusiast
这是一个必填字段,您将在[卡片文档](https://dev.twitter.com/cards)中看到。你需要让你的页面有一个可以传递到Twitter标签的'{{description}}值,否则验证器不会通过该卡片。 –