Share streamlit app as a preview-content instead of an url

Hi!

When a newspaper-article or an youtube-clip is shared on social media, it does not display as a url, it shows a preview of the content (like the headline or the title). See attached image.
Is it possible to get a shared streamlit-app to do that?

Thanks
Niklas

added an image, perhaps helps explain my question

Hi @niklas_ema :wave:

The thing is that you need open graph meta tags to be rendered into your apps initial HTML code. It may be possible to configure additional metadata in your apps configuration like you can do with the <title> already (see page configuration reference).

Unfortunately to see this a social media preview bot needs to render the app, which means execute JavaScript. Most of those bots do not render JS at this time and therefore will never see the apps metadata nor the apps content.

2 Likes

Thanks for clearing that out! I wonder if it would help to use heroku instead of streamlit share? Or if the streamlit-app was iframed into another webpage. I actually think this could make a difference for the shareability of streamlit apps.

1 Like

Iā€™m not familiar with heroku. As far as I can see they do offer some caching mechanics.
Embedding your app on your own webpage would give you full control over all the metadata you need to perfectly promote your app.

1 Like

Thanks, much appreciated!

1 Like

Thanks for your input on this, Seb! :pray:

1 Like