Support for twitter card

pishio(69)
Published in
dev
Words
129
Reading
1 min
Listen
Play
4y

Twitter card

When sharing a post on twitter, social media, or messenger, the title is displayed along with the representative photo.
Is this possible in CSR (SPA)?

In CSR, react-helmet or document is used to change the meta tag of the html header.

Javascript bot

To read the updated meta tag in the CSR, the social media platform must support javascript loading.
However, most of them do not support javascript loading.

Seeing the comment that CSR applied twitter card using react-helmet,
This is the conclusion of a day of shoveling.

SSR

The conclusion is to apply as SSR.
Even if CSR is applied in the twitter card, Javascript loading is not supported in other messengers or platforms.

Sharing is important, so I switch back to SSR.

Support for twitter card | Ecency