Twitter card not working

2019-05-17 18:52发布

My meta tags for twitter in site:

<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:site" content="....">
<meta property="twitter:title" content=".....">
<meta property="twitter:description" content="test description">
<meta property="twitter:image" content="....">

I even tried with twitter:image:url and also allowed twitter bot in robot.txt but no luck till now

标签: meta-tags
3条回答
Melony?
2楼-- · 2019-05-17 19:38

If none of the above works, try changing twitter:image to twitter:image:src and make sure that the image fulfills the size requirements:

smallest size supported

  • summary: 144x144px
  • summary_large_image: 300x157px

Largest size supported

In both cases the maximum is 4096x4096px and at most 5MB.

查看更多
smile是对你的礼貌
3楼-- · 2019-05-17 19:43

May I know where did you test if the twitter card is working or not? Did you check with https://cards-dev.twitter.com/validator?

Also, sometimes the placement of the meta tags do matter, place them early in the head section but after the og (open graph) meta-tags.

Let me know what error you get(if any) on the card validator.

查看更多
对你真心纯属浪费
4楼-- · 2019-05-17 19:44

Use name instead of property in you meta tags Like :

<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="....">
<meta name="twitter:title" content=".....">
<meta name="twitter:description" content="test description">
<meta name="twitter:image" content="....">
查看更多
登录 后发表回答