如何使我的网站网址在社交应用程序(Discord、Twitter 等)中生成漂亮的嵌入式药丸?

发布于 2025-01-10 02:45:46 字数 542 浏览 5 评论 0原文

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

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

在此处输入图像描述

Twitter 中的相同 URL:

在此处输入图像描述

如何使我的网站也生成漂亮的嵌入式药丸?

我一直在尝试 Open Graph 中的内容,但它们对我不起作用。

I am seeing that when I put URLs for some websites in Discord or in Twitter, the applications shows nice embedded pills of the website directly in the stream.

For example this is the embedded pill of a github url in Discord:

enter image description here

The same URL in twitter:

enter image description here

How can I make my website to also generate nice embedded pills?

I have been trying things from Open Graph but they are not working for me.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

猫性小仙女 2025-01-17 02:45:46

我设法让它在 Discord 中工作,这就是我的 中的内容:

  <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." />

I managed to make it work in Discord, this is what I have in my <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." />
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文