如何使用元数据更改 Twitter 卡片中的 OG url?

问题描述 投票:0回答:1

Example card

我想将 bbc.com URL 更改为另一个 URL。我已经更改了我的 HTML 中的元数据,但它似乎一直显示“bbc.com”。还有其他人能够成功地更改它以显示另一个 URL。

我已经尝试了一切,从添加带有我自己网站的 URL 和卡数据的 manifest.json,但它仍然显示“bcc.com”

twitter metadata reflect-metadata
1个回答
0
投票

修改以下行:

<meta property="og:url" content="https://myurl.com/my-page" />

总而言之,你应该拥有:

<meta name="og:description" content="This is where the description of my webpage goes." />
<meta name="twitter:card" content="summary">
<meta name="twitter:image:alt" content="Description of My Image">
<meta property="og:image" content="https://myurl.com/my-image.jpg" />
<meta property="og:title" content="My Page Title" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://myurl.com/my-page" />
© www.soinside.com 2019 - 2024. All rights reserved.