Questions tagged [web-share]
63 questions
9
votes
2 answers
Web Share API not working on iOS: Angular
I am trying to share an image like a native app via web. I am using Angular for the same. I have used the web share API. This works normally on Android however, throws an error while in iOS(Both Safari and Chrome). I am using a share button to…

Dhanya Baid
- 115
- 1
- 9
6
votes
1 answer
Navigator.share() doesn't work for second time
There is an example on MDN with Webshare API: https://mdn.github.io/dom-examples/web-share/
On my iOS device (iPhone 7 / iOS 14.0 / Safari) it works fine only once. For the second time it throws permission error:
Error: NotAllowedError: The request…

Taif Alimov
- 61
- 2
5
votes
2 answers
Share image via social media from PWA
In my Nuxt PWA I have a function that converts my HTML to Canvas using this package. The generated image is in base 64. Now I want to be able to share that image via: Whatsapp, Facebook, email, Instagram etc. I have found several packages but they…

user3718908x100
- 7,939
- 15
- 64
- 123
5
votes
2 answers
If web share API is supported it should show up native share dialog else it should go to the URL defined in href of the anchor tag
Below code works well on devices where web share API is supported and shows the native share dialog but throughs "Uncaught (in promise) DOMException: Share canceled" error where web share API is not supported and do not goes to the URL defined in…

DMP
- 523
- 4
- 19
5
votes
3 answers
Navigator.share only working once in iOS, second click throws error "request is not allowed by the user agent..."
Has anyone else ran into this issue? I'm implementing the Web Share API to add a share button to a number of listings on a page. The code seems to be working fine initially, as I can click any of the "Share" buttons and the dialog will appear…

Ryan
- 51
- 1
- 2
4
votes
1 answer
Sharing an image using the WebShare API in iOS is failing
I trying to use the WebShare API to share an image in iOS and Android. In Android, my code works perfectly, but in iOS, in some apps like WhatsApp doesn't share the image, it only shares the URL. In a few apps like the email, it's working. I added…

Federico Navarrete
- 3,069
- 5
- 41
- 76
4
votes
0 answers
Web Share API text missing
I am attempting to provide a share button using the navigator.share() api, but when sharing to certain platforms (e.g Telegram, Slack) the text is missing.
I have seen people claim that only the link is shareable to certain platforms, and I would…

Joseph Pasque
- 41
- 2
4
votes
2 answers
Web Share API: Permission Denied on certain file type
I would like to share a JSON object as a file via the Web Share API.
However, when specifying the type as application/json, I got the DOMException: Permission denied Error:
navigator.share({
files: [new File(["{}"], "test.json", {type:…

Jamie Phan
- 796
- 1
- 7
- 26
4
votes
1 answer
Is Web Share API broken on Chrome + Windows 8.1?
My code is similar to many examples on the web, including MDN code at https://mdn.github.io/dom-examples/web-share/
btn.addEventListener('click', () => {
navigator.share(shareData)
.then(() =>
console.log('MDN…

kubicle
- 73
- 10
3
votes
1 answer
Sharing files over webshare api only partially working on IOS 15
For a webapp I'm building I need to integrate file sharing capabilities. This is now finally possible since the IOS 15 release. However, I only got it partially working. When I share the file with email or messages it works fine. But when I try to…

Stefan Guggisberg
- 123
- 1
- 8
3
votes
1 answer
web share api - share image from url or source
how to share image with source from
use web share api. This my code not work
let file = "https://tukarjual.com/images/ads/all-category.jpg"
let filesArray = [file]
if (navigator.canShare &&…


Hendri Arifin
- 31
- 1
- 4
3
votes
1 answer
"Copy" option missing from Safari Desktop Web Share API?
I am trying to implement the Web Share API for some text I want to allow users to copy/share, and it's been successful except for an issue with Safari desktop. I check for navigator.share and if it exists, then only do I open the native share…

sammiepls
- 1,340
- 2
- 13
- 19
2
votes
0 answers
Web Share API is not working when button is clicked
I am trying to use the web share API in order to allow users to share the links of article URLs. I want it to be that when a user clicks on the "Share Article" button, the user receives multiple social media and apps that they can share to and when…

ohmygodimpregnant
- 227
- 2
- 11
2
votes
2 answers
Web Share API sharing files Permission Denied
I'm not sure what I'm doing wrong here, I think there should be more documentation or better error descriptions for this Web Share API.
I'm trying to share the following file
{
lastModified: 1622843015507
lastModifiedDate: Fri Jun 04 2021…

Gabriel Luque
- 117
- 11
2
votes
1 answer
navigator.share file not working on iOS 14 Safari
I'm trying to add to my webpage an option to share image and video using Web Share API. When testing it, I'm having the following problem: on Android + Chrome, it works sharing video and images, but when I execute the same code on iOS 14.4 Safari…

Gabriel Schubert
- 165
- 4
- 12