I am working on a question web-app which has 20 posts on a single page. I have to implement facebook share button on each question. I am using meta og:image. However, for sharing each single post, og:image content will have to be changed, but FB doesnot seem to read changes through javascript. As a result, questions within image post is not visible. What are the ways to implement dynamic meta tags so that the images are visible during fb sharing.
Asked
Active
Viewed 1,627 times
1 Answers
2
JavaScript will be ignored by Facebook, the usual solution is SSR (server side rendering) or something like https://prerender.io/ - you have to make sure each post has a static link.
I am using Next.js with SSR for that, and can only recommend it. Another solution would be Gatsby, for example.

andyrandy
- 72,880
- 8
- 113
- 130
-
what about using nextjs with react for server side rendering. Will it solve this issue? – sine99 May 03 '19 at 01:47
-
i am using next.js with SSR for that (and other things), yes. – andyrandy May 03 '19 at 06:25