Questions tagged [web-share]

63 questions
1
vote
1 answer

navigator.share (Web Share api) share React App text, not the text I put

I'm using React (not React Native) and I'm trying to use Web Share Api to share some text and an url through my app. However, when I open any app to share, it changes from the text I've put to a default text from React local development. Yes, I'm…
W. Lucas
  • 23
  • 1
  • 6
1
vote
1 answer

Web Share API fails on second execution

I implemented the navigator.share() function in my code. It works on the first call, but when I try to call it again through the same event, I get the NotAllowedError: The request is not allowed by the user agent or the platform in the current…
Max
  • 754
  • 8
  • 24
1
vote
1 answer

navigator.share is set on desktop Firefox but doesn't do anything

I have some code like this: if (navigator.share) { navigator.share({ title: 'example', url: 'http://example.com', }); } According to this documentation for navigator.share on MDN, desktop browsers do not support the Web Share API, and…
Flimm
  • 136,138
  • 45
  • 251
  • 267
1
vote
1 answer

Is it possible to share multiple files with Web Share Target API?

Is it possible to share multiple files using Web Share Target API? I can select multiple pictures in Google Photos, hit Share, then select my PWA. But only one of the selected files is sent to the share_target URL given in the manifest.json. This is…
1
vote
1 answer

How to exit my PWA after sending data with Web Share Target?

If I share a picture from Google Photos to my PWA (installed with Chrome on Android and using this code https://web.dev/web-share-target/), I arrive on my PWA page. How to go back automatically to Google Photo? Backend is in PHP if that…
0
votes
1 answer

Navigator.share API does not share text with image on Pinterest

I am using navigator.share to pin image from reactjs app to Pinterest. But it only saves image and no description is there. On desktop i am able to save image and description using URI schema as
Nadir Hussain
  • 31
  • 1
  • 3
0
votes
0 answers

Sharing vCard using Web-Share API: Permission Denied

I have the following code to share vCard on my android device. And handler const handleAddToContact…
Swapnil Soni
  • 965
  • 1
  • 10
  • 26
0
votes
1 answer

navigator.share does not work properly on Windows 10 Chrome + Edge browsers

I use web share API, according to caniuse website it should be supported on Windows OS (browsers Chrome and Edge). But when I try to use navigator.share({ title: 'Title' }); I receive an empty window with the message. If I use Mac OS Safari it…
Max
  • 781
  • 7
  • 19
0
votes
0 answers

Navigator.share() not sharing files on Opera Mobile

I'm using the Web Share API to share pdf files generated with jspdf. It works as expected for browsers such as Chrome and Edge (Desktop and Mobile) but I can't get it working on Opera for Android. When calling the navigator.share() method, the share…
ariverof
  • 27
  • 1
  • 7
0
votes
0 answers

Web Share API availability check causes typescript warning

I have a react functional component where I store a state value to define if the Web Share API is available in the users browser. I do that by initializing the state with: const [canShare, setCanShare] = useState(navigator.share ? true :…
0
votes
1 answer

Trying to create a button that handles an upload and a web share api function at the same time

I am trying to create a single button in my React app that allows me to upload an image, and then using the web share api, share the uploaded image to whatever the user wants to... My issue is, I cannot seem to execute the two one after the…
emartindev
  • 29
  • 4
0
votes
0 answers

Is there a way to hide the logo image in the OS native share menu invoked by web share api?

Is there a way to hide the logo image in the OS native share menu invoked by web share api? share menu sumple I am hoping to find out if there is a parameter to hide the logo image when invoking the share menu with the web share api. I would also…
yuta
  • 1
0
votes
1 answer

I want to add Share to Slack feature in my web app. Facing issue in showing the popup to select the receipients

I am adding share to slack functionality in my web app. But I cannot find any solution by which I can show my app users to select a user/channel or team in slack to share the content with. I have added Sharing on Teams also. In that I am able to…
0
votes
1 answer

PWA - Web Share Target "property 'action' ignored, should be within scope of manifest"

My Web Share Target does not work, I get the error "property 'action' ignored, should be within scope of manifest" when my PWA gets installed. In the manifest.json I have configured the share_target as below: "share_target": { "action":…
0
votes
1 answer

What is the benifit of using `url` over `text` on the Web Share API?

I am wondering if there is any benefit using url over text on the Web Share API? Let me explain why I am asking this: I am using the Web Share API to share a URL to my website accompanied with some text like this: navigator.share({ title:…
Tafel
  • 1,017
  • 10
  • 17