OG Image Generation
Answered
Yellow and black potter wasp posted this in #help-forum
Yellow and black potter waspOP
Hey, I have an OG image that is successfully generated at
However, the Twitter card validator and other Opengraph tools are showing that none of the information is being filled out. Am I doing something wrong within the metadata configuration?
/api/og/[slug]/route.tsx and I'm trying to use this image within a dynamic route /song/[slug]/page.tsx . In this page I'm exporting dynamic metadata to generate a Twitter card as shown in the attached photo. However, the Twitter card validator and other Opengraph tools are showing that none of the information is being filled out. Am I doing something wrong within the metadata configuration?
Answered by nkilm
I did face same similar issue at one point of time. It was due to cache.
13 Replies
@Yellow and black potter wasp Hey, I have an OG image that is successfully generated at `/api/og/[slug]/route.tsx` and I'm trying to use this image within a dynamic route `/song/[slug]/page.tsx` . In this page I'm exporting dynamic metadata to generate a Twitter card as shown in the attached photo.
However, the Twitter card validator and other Opengraph tools are showing that none of the information is being filled out. Am I doing something wrong within the metadata configuration?
If you directly open the devtools in your browser, can you see the meta tags?
Be careful that middleware might be triggered too.
If this page requires the user to be login first, 3rd party services won't be able to fetch your page.
If this page requires the user to be login first, 3rd party services won't be able to fetch your page.
Yellow and black potter waspOP
Hey Thanks for the reply, I don't have any authentication required for the site but I am able to view my metadata within the head tags. For both OG and Twitter
Then that is strange... Seems like they can't even fetch your page tho
Is there a possibility that they are being redirected to somewhere else?
Is there a possibility that they are being redirected to somewhere else?
@Yellow and black potter wasp Is your code open-source?
@fuma Then that is strange... Seems like they can't even fetch your page tho
Is there a possibility that they are being redirected to somewhere else?
Yellow and black potter waspOP
I thought this would be the case also but there aren't any redirects happening. When using
https://www.url it redirects back to https://url which is wanted for now@nkilm <@634881097867722754> Is your code open-source?
Yellow and black potter waspOP
Unfortunately not yet. Haven't secured my tokens and other miscellaneous things. I can provide screen shots of my implementation though!
Well, I don't have any ideas now. Maybe try to reproduce the bug again?
@fuma Well, I don't have any ideas now. Maybe try to reproduce the bug again?
Yellow and black potter waspOP
Thank you anyways! I'll dig a little deeper into the issue for sure
I did face same similar issue at one point of time. It was due to cache.
Answer
Yellow and black potter waspOP
Hey thank you both @nkilm @fuma it was definitely a caching issue. Had to hard refresh Twitter ðŸ«
Ah great!