【问题标题】:Twitter showing a placeholder image if no image is given on web page如果网页上没有提供图像,Twitter 会显示占位符图像
【发布时间】:2016-09-25 15:03:35
【问题描述】:

我在 twitter 上分享了一个 URL http://www.aao.org/eye-on-advocacy-article/key-congressional-committee-opposes-part-b-demo,它没有任何 og:image 元标记,因为本文没有图片。

但是在 twitter 上分享 url 时,它需要一个默认的占位符图像,它实际上是一个 twitter 图像https://ton.twimg.com/tfw/assets/link_v1_e64f66f5650df987d97cc5f00c4cb5987f367028.svg 与共享链接一起显示,但它根本不应该显示任何图像。

我用于此页面的 twitter 元标记是:

<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="American Academy of Ophthalmology">
<meta name="twitter:title" content="Key Congressional Committee Echoes Academy’s Opposition to Medicare’s Proposed Part B Drug Demonstration">
<meta name="twitter:description" content="Our friends in Congress are pressuring CMS to change planned initiative that would hurt our ability to care for ophthalmology’s patients">
<meta name="twitter:creator">

and some other og meta tags

谁能建议我可以在页面中添加或删除什么,以便在 twitter 上分享时不会显示占位符图像?

【问题讨论】:

    标签: twitter share facebook-opengraph meta-tags twitter-card


    【解决方案1】:

    Twitter 不允许文章没有缩略图,因此您需要添加缩略图以移除默认缩略图。

    试试这个:

    <meta
        name="twitter:image"
        content="image url here"
      />
    
    // If the above doesn't work
    
    <meta
        name="og:image"
        content="image url here"
      />
    

    如果需要,您还可以将图像设置为空白图像(白色背景或完全透明)

    【讨论】:

      猜你喜欢
      • 2011-10-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-01
      • 2020-12-05
      • 1970-01-01
      相关资源
      最近更新 更多