0

Title and description are set like here but I'm pulling from api.

enter image description here

This is what the title and description look like when I share the link on Discord or any other social media

site: https://istanbulfood.be/


enter image description here

next-seo codes I use:

<NextSeo
  title={title}
  description={description}
  canonical={`${siteSettings.author.websiteUrl}${path}`}
  openGraph={{
    url: `${siteSettings.author.websiteUrl}/${path}`,
    title,
    description,
    images: [
      {
        url: '/assets/images/logo.png',
        width: 800,
        height: 600,
        alt: 'İstanbulfood',
      },
      {
        url: '/assets/images/logo.png',
        width: 900,
        height: 800,
        alt: 'İstanbulfood',
      },
    ],
  }}
/>
1
  • I solved it yesterday, got the same problem in Whatsapp link preview. Don't know if you solved it already, but the key is to put the info outside of components that would run javascript before rendering them, like in _app.js.
    – KeitelDOG
    Feb 9, 2023 at 18:24

1 Answer 1

0

You need to use open graph tags in your site markup to get rich link support in social media.


Inside openGraph props, can you try to add another attribute type: 'website'? Also use full url for your images inside openGraph. Please visit this link to test your rich link

2
  • i added the codes i used Jan 19, 2023 at 19:10
  • Inside openGraph props, can you try to add another attribute type: 'website', ? Also use full url for your images inside openGraph. Please visit this link to test your rich link
    – Khairul
    Jan 19, 2023 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.