0

I am making a website with express.js and ejs, and I want to add OG embeds to it. Specifically, to be displayed when used in a message in Discord. I have an https://domain/devs endpoint which returns a .ejs file with such code in the <head> tag:

<meta property="og:title" content="something">
<meta property="og:type" content="website">
<meta property="og:image" content="https://cdn.discordapp.com/attachments/820672283289845760/827865044778745866/avatar.png">
<meta property="og:url" content="https://domain/devs">

Everything looks correct but nothing shows up when I use https://domain/devs in the message in Discord. What am I doing wrong? How to do that correctly?

P.S. To clarify what I mean for OG, I want https://domain/devs to display an embed like https://www.youtube.com/ when used in a message

Fortnite
  • 81
  • 2
  • 6

1 Answers1

1

I'd hazard that you need a few more tags for Discord to recognize it, such as og:description and/or og:site_name. Since you have og:image, you should also consider adding og:image:alt.

I got mine working with only these three added to yours. Mine would fail load to because I had mispelled description as decription, but they started working immediately after fixing that typo.

Estecka
  • 388
  • 1
  • 15