Web Share API -- has anyone used it succesfully?


Has anyone had any experience with the Web Share API?

I saw this video (https://www.youtube.com/watch?v=lsyR1cbvSbU) and thought it would be the best way to implement social sharing, but I get a “bug in custom html” error. Which is odd as I have copied it correctly from the link below:
Navigator: share() method - Web APIs | MDN


Just copying it won’t work. Assuming you assigned the IDs to the elements, you have put the code inside script tags, and you have updated the corresponding fields to the IDs of your elements in the code, it should work.

This is the demo:

And this is the code I have:

And here are the ID fields of the button:

In my case, the textfield I set is not updated, but that’s another issue :slight_smile:

This topic was automatically closed after 70 days. New replies are no longer allowed.