og:type cannot be set to "product"
Unanswered
Cape lion posted this in #help-forum
Cape lionOP
I have read the documentation on next.js about metadata and cannot find an answer to my question there or anywhere else for that matter so this is my last resort. Problem: I'm trying to generate metadata for a product page dynamically using next.js 13 app function as follows:
and i'm getting an error in the browser saying: "Error: Invalid OpenGraph type: product". If I set it to e.g. "website", it works but I want to be able to set it to product. How can i go about this?
export async function generateMetadata({ params, searchParams }, parent) {
(code to generate down below variables)
return {
title: title,
description: description,
keywords: keywords,
openGraph: {
images: [
imageUrl
],
title: title,
description: description,
url: 'products/' + params.slug,
type: 'product',
},
alternates: {
canonical: 'products/' + params.slug,
}
}
}and i'm getting an error in the browser saying: "Error: Invalid OpenGraph type: product". If I set it to e.g. "website", it works but I want to be able to set it to product. How can i go about this?
5 Replies
Northeast Congo Lion
i cant see 'product' as a valid type here
Cape lionOP
Yeah I saw that too, but it says if you google it that your supposed to be able to type it, according to Facebook for example.
Northeast Congo Lion
i cant see it on og protocol site
my guess is it is not available