0

我看到当我将某些网站的 URL 放入 Discord 或 Twitter 中时,应用程序会直接在流中显示该网站的漂亮嵌入药片。

例如,这是 Discord 中 github url 的嵌入式药丸:

在此处输入图像描述

推特中的相同网址:

在此处输入图像描述

我怎样才能让我的网站也生成漂亮的嵌入式药丸?

我一直在尝试Open Graph的东西,但它们对我不起作用。

4

1 回答 1

0

我设法让它在 Discord 中工作,这就是我的<head>

  <meta property="og:image" content="https://land.playcocola.com/playcocola_assets/Bottle_objects_black.png" />
  <meta property="og:image:alt" content="The easiest way to get videos of people playing your game." />
  <meta property="og:image:width" content="1053" />
  <meta property="og:image:height" content="984" />
  <meta property="og:site_name" content="Playcocola" />
  <meta property="og:type" content="object" />
  <meta property="og:title" content="Playcocola - The Playtesting Platform for the Indie Dev Community" />
  <meta property="og:url" content="https://land.playcocola.com" />
  <meta property="og:description" content="The easiest way to get videos of people playing your game." />

  <meta name="twitter:image:src" content="https://land.playcocola.com/playcocola_assets/Bottle_objects_black.png" />
  <meta name="twitter:site" content="@playcocola" />
  <meta name="twitter:card" content="summary_large_image" />
  <meta name="twitter:title" content="Playcocola - The Playtesting Platform for the Indie Dev Community" />
  <meta name="twitter:description" content="The easiest way to get videos of people playing your game." />
于 2022-02-26T15:44:30.427 回答