oddsdk / odd-app-template

A sveltekit web app template for the ODD SDK.
https://odd-template.fission.app
MIT License
29 stars 10 forks source link

Fix social preview #63

Open bgins opened 2 years ago

bgins commented 2 years ago

The social preview at https://webnative.netlify.app does not currently unfurl to app information and the social preview image. It can be inspected at https://www.opengraph.xyz/url/https%3A%2F%2Fwebnative.netlify.app%2F.

I think the issue might be in the dynamic way we fill in the meta tags. It may be that social media platforms do not execute the necessary JavaScript to populate the tags. They do appear to render fine in a webpage and can be inspected there.

Maybe there is a SvelteKit config that could help us with this? Another alternative would be hard-coding the values into app.html, but it would be nice to find a better way.

bmann commented 2 years ago

Yes AFAIK you need static / server side rendered info for social graph.

bgins commented 1 year ago

We may be able to use https://www.npmjs.com/package/svelte-meta-tags to generate the meta tags.