How to create Social Media Share Button on Dash?

It would be great if the user has the option to publish the results on any social media channel. Is it possible to share Dash content to a social media for example facebook ,twitter etc?.

For instance, facebook provides the following instructions:

Step 1: Include the [JavaScript SDK](https:// JavaScript SDK - Web SDKs - Documentation - Facebook for Developers) on your page once, ideally right after the opening body tag.

Step 2: Place this code wherever you want the plugin to appear on your page.


I guess step 1 could be managed adding external CSS/Javascript

Step 2 involves adding raw html to the app and here I am confused because I have read that it is not safe . I guess it could be done using “dash-dangerously-set-inner-html” but I am not sure if this is safe or not…

Could someone point me in the right direction? An example would be great



1 Like

Hiiiii. It’s been a long time, but I think I’ve managed a dodgy fix using flask-share :slight_smile: