Whatsapp html call link [closed]

2019-01-23 21:02发布

问题:

Is there a way to add a link on my website that will say "Call now" and when it's pressed the user can call from their whats app.

Any help would be very helpful. Thanks

回答1:

Creating a telephone link is much like creating a mailto: link... your link would look like this:

<a href="tel:1234561234">Call ME!</a>

this tells browser plugins and smart phones that the link being followed is a telephone number and to use the default telephone application installed.

EDIT:

Based on feedback and what other users have commented, I would suggest trying this, I am unsure if this will work as expected but maybe try some different combinations.

<a href="whatsapp://tel:3216541234"></a>

Or

<a href="whatsapp://3216541234"></a>

if this works for you please mark the other user who posted this information as the right answer... I simply referenced his/her content, I knew this kind of thing existed but did not know the url design so they do deserve the credit.

SECOND EDIT: Visit this website to see kind of how this should work: https://www.whatsapp.com/faq/android/28000012

based on what I see here, I would actually guess it's more like:

<a href="whatsapp://call?number=##########"></a>

Please let us know the working result so I can modify my response to have the right answer. :)



回答2:

WhatsApp listens to URL patterns whatsapp://*, although I can't find any public documentation for it. Here is the documentation for sending a message for Android and iOS respectively.