Support Forums

Open Graph data of a specific page not found on platforms other than facebook and twitter


On our reactjs project running on Netlify we have default meta tags for the title, description and the images of all our pages. I wanted to custom those tags for a specific page on the project, so when that page is shared the Open Graph title would be the title of the page. We use react-helmet to custom those meta tags on different pages. (prerender option is activated in Netlify)
Like this:

    <meta charset="utf-8" />
    <meta name="fragment" content="!" />
    <meta property="title" content={title} data-react-helmet="true" />
    <meta property="description" content={content} data-react-helmet="true" />
    <meta property="og:url" content={link} />
    <meta property="og:title" content={title} data-react-helmet="true" />
    <meta property="og:description" content={content} data-react-helmet="true" />

    <meta property="twitter:url" content={link} />
    <meta property="twitter:title" content={title} data-react-helmet="true" />
    <meta property="twitter:description" content={content} data-react-helmet="true" />
    <link rel="canonical" href={link} data-react-helmet="true" />

Now the problem is, when I share that specific page on linkedin for example (or other platforms like Discord, Teams), the default title, description & image of the website is taken but not the custom ones. On the other side, sharing that page on Twitter or Facebook works like a charm. That is because on twitter and facebook, the User-Agent is a bot so the prerendered version of the page is shown (if I’m not wrong).

How can I configure this to always show the prerendered version of the page instead of a white blank page?

I debugged with GitHub - netlify/prerender and everything works fine

hi there, sorry to be slow to respond. did you see this guide already?

Hi, @perry yes I did ! I tested all the solutions from that post. It helped a little bit but the problem still persists.

Hey there, @sammysadati :wave:

It looks like this thread has been a bit quiet since you last wrote in-- thanks for your patience. When you say “it helped a little”, can you elaborate on anything that has changed? What issues are still persisting?

Thank you :slight_smile: