'Inertiajs add open graph meta tag

what I have tried it using the head tag by inertia.

<Head>
    <!-- HTML Meta Tags -->
    <title>{{ product.name }}</title>
    <meta name="description" :content="product.summary"/>

    <!-- Open Graph Meta Tags -->
    <meta property="og:url" :content="http://localhost/${product.slug}/${product.id}/`"/>
    <meta property="og:type" content="product"/>
    <meta property="og:title" :content="product.name"/>
    <meta property="og:description" :content="product.summary"/>

    <!-- Thumbnail Meta Tags -->
    <meta head-key="og:image" property="og:image"
          :content="`http://localhost/${product.thumbnail.path}-size-300.${product.thumbnail.mime}`"/>
    <meta property="og:image:width" content="300"/>
    <meta property="og:image:height" content="300"/>

    <!-- Locale Meta Tags -->
    <meta property="og:locale" content="en_MY"/>
    <meta property="og:locale:alternate" content="zh_CN"/>
</Head>

However, this code doesn't detected by the Facebook, since it is dynamic generated after javascript have run

Thank you.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source