Hi,
I'm trying to share an image to facebook using navigator.share. It works totally fine on Android, but it doesn't work on Safari, iOS. On iOS, it looks like I was sharing text instead of an image. Here's the snippet.
I'm trying to share an image to facebook using navigator.share. It works totally fine on Android, but it doesn't work on Safari, iOS. On iOS, it looks like I was sharing text instead of an image. Here's the snippet.
Code Block let blob = await fetch( document.getElementById("imagetag").src ).then((r) => r.blob()); let file = new File([blob], "googleimage.png", { type: "image/png", }); try { await navigator.share({ files: [file], title: "test share Image" }); console.log("share successful"); } catch (err) { console.log(`Your system doesn't support sharing files. ${err}`); }