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}}值,否則驗證器不會通過該卡片。 –