nygardk / react-share

Social media share buttons and share counts for React
MIT License
2.6k stars 430 forks source link

Use just api. in WhatsappShareButton.ts #459

Open SaadBazaz opened 2 years ago

SaadBazaz commented 2 years ago

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 commented 2 years ago

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

React 18 Next 12

matscode commented 1 year ago

This should be merged....

matscode commented 1 year ago

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.

nygardk commented 7 months ago

Closing as stale. Please reopen if needed.

SaadBazaz commented 7 months ago

@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