react-share icon indicating copy to clipboard operation
react-share copied to clipboard

Use just api. in WhatsappShareButton.ts

Open SaadBazaz opened this issue 2 years ago • 5 comments

Use just api.whatsapp.com instead of choosing between api.whatsapp.com and web.whatsapp.com, because api now handles all scenarios (Web, Mobile and Desktop)

SaadBazaz avatar Jun 23 '22 11:06 SaadBazaz

Tested and working correctly on both mobile, desktop and WhatsApp Web.

React 18 Next 12

SaadBazaz avatar Jul 01 '22 18:07 SaadBazaz

This should be merged....

matscode avatar Feb 07 '23 10:02 matscode

I recently support merging this PR, because for some weird unknown reason; web.whatsapp.com was not accessible, but api.whatsapp.com was working. I thought whatsapp had remove the web. subdomian. so, I was thinking of forking the repo to make the change above.

Suddenly it web.whatsapp.com is now accessible. So, I don't think this PR needs to be merged anymore because the current whatsapp sharing experience is way better than what this PR would offer. Sorry @SaadBazaz. Nice effort though.

matscode avatar Feb 07 '23 11:02 matscode

Closing as stale. Please reopen if needed.

nygardk avatar Nov 19 '23 08:11 nygardk

@nygardk - Why I don't consider this stale:

  1. wa.me or api.whatsapp.com are the official and recommended ways of sharing to WhatsApp.
  2. web.whatsapp.com does not work for WhatsApp Desktop. It almost ALWAYS opens the web version, and most people I know have the Desktop version. The best part about api.whatsapp.com is that it first asks to open WhatsApp Desktop. If WhatsApp desktop is not present, it opens the web version. That is the best User Experience, in my opinion.

Here's a video recording of what I'm talking about.

Here's when I use web.whatsapp.com Screenshot 2023-11-20 at 09 55 15

Here's when I use api.whatsapp.com

https://github.com/nygardk/react-share/assets/51885228/d33e1b3b-98e6-4fc8-a178-eb9199c89ca9

SaadBazaz avatar Nov 20 '23 04:11 SaadBazaz