10

I'm using Whatsapp Click-to-chat functionality, without a phone number. It previously worked but with the new Chrome version 76.0.3809.132, both on iOS and Android is not working anymore. On Android, it's showing a Toast with Couldn't open link. Tried contacting Whatsapp Support but no answer as of yet. With the latest update their own documentation example is not working, link to docs. Any suggestions or experiences?

Link example:

<a target="_blank" href="https://wa.me/?text=Villa%20stone%20road%20piece%2015%20meters%20from%20the%20asphalt%20street" title="Share on WhatsApp">

Error picture Imgur: picture

A table with my tested devices and versions on Imgur

Alexandru Buhai
  • 113
  • 1
  • 1
  • 8

5 Answers5

9

If you use https://api.whatsapp.com/send instead of https://wa.me/ you don't need to specify a phone number.

e.g

https://api.whatsapp.com/send?text=Your%20Custom%20Text
  • 2
    Yeah this does the trick (tested on Android too). The documentation here: https://faq.whatsapp.com/en/iphone/26000030/?category=5245251 is incorrect. – Andrew Tanner Oct 28 '19 at 11:03
4

It seems that chrome does not accept click to chat without a number specified. Once there's a number in the URL it works just fine.
Unfortunately I did not find a hack to get around it. Neither of this worked:
https://wa.me//?text=Hello%20World
https://wa.me/0/?text=Hello%20World
only if a proper number is specified it will open WhatsApp, but has the recipient already pre selected (the number we provide).

I tested it for a client about 2 weeks ago, when it still worked. So the last update of Chrome (from Aug 26) seems to be the problem...

cygro
  • 74
  • 3
  • 9
    Thanks for the confirmation, that's pretty much what I discovered too, found a hack around it, but I'll just wait for a new Chrome update. For the hack: I changed the link from _wa.me_ directly to _api.whatsapp.com/send?phone=&text=&source=&data=_ – Alexandru Buhai Sep 04 '19 at 10:26
2

The best is to use the custom url scheme format. Universal links do not work well with native clients

whatsapp://send/?phone=&text&source&data

It will work without phone number also.

My issue on a recent breaking-change: Universal links stopped working

There was a great blog post about the issue, however it is already outdated and proposes a php specific solution (nevertheless might gives you a good idea, how to think about the problem)

sznrbrt
  • 993
  • 2
  • 11
  • 32
  • This doesnt seem to work for safari at all places. Had to use https://api.whatsapp.com/send?text=Your%20Custom%20Text – Arpan Jain Mar 01 '22 at 09:53
2
const text = "Hello..."

const phoneNumber = "23400000000000"


Linking.openURL(`whatsapp://send?text=${text}&phone=${phoneNumber}`)
Chinedu Ofor
  • 707
  • 9
  • 11
0

First: Official Whatsapp Sharing Documentation. One of the following URLs is recommended for WEB use...

https://api.whatsapp.com/send?text=YourShareTextHere

https://api.whatsapp.com/send?text=YourShareTextHere&phone=123

And these for MOBILE use...

whatsapp://send?text=YourShareTextHere

whatsapp://send?text=YourShareTextHere&phone=123

If you are interested in watching a project that keeps track of these URLs, then check us out!: https://github.com/bradvin/social-share-urls#whatsapp

Social Share URLs

HoldOffHunger
  • 18,769
  • 10
  • 104
  • 133