Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add Whatsapp function to website, like sms, tel

I have a website that a lot of people view on mobile. I have link for : Call and SMS and I want to add one for Whatsapp, so a user can click the whatsapp link I create and start a conversation with me.

If this is possible can someone point me in the right direction on how?

like image 567
user3041174 Avatar asked Jan 30 '14 08:01

user3041174


People also ask

How can I redirect WhatsApp in HTML?

Use https://wa.me/whatsappphonenumber?text=urlencodedtext where whatsappphonenumber is a full phone number in international format and urlencodedtext is the URL-encoded pre-filled message.

How use WhatsApp API in HTML?

A Share this on whatsapp button : Use https://wa.me/?text=urlencodedtext to open a whatsapp contact selection dialog with a preset text. e.g.

How do I send a link to WhatsApp?

Open the app and navigate to Settings > Business Tools > Short Links. Tap “short link” to view the link. Tap the link icon to copy the link and paste it into a message, social post, or add it to another website.


2 Answers

below link will open the whatsapp. Here "0123456789" is the contact of the person you want to communicate with.

href="intent://send/0123456789#Intent;scheme=smsto;package=com.whatsapp;action=android.intent.action.SENDTO;end"> 
like image 144
Rahul Mamtani Avatar answered Sep 24 '22 02:09

Rahul Mamtani


Check this link out Launching Your iPhone App Via Custom URL Scheme

and more on the whats up url scheme document

I did a quick mock up and tried it on my iphone with a link like this from a webpage and it opened the app on my iphone.

<a href="whatsapp://send?text=Hello%2C%20World!">whatsapp</a> 

I could not try to send a message as I don't have a current Whatsapp account sorry.

Add user name using abid parameter

let's say your whatsapp username was username then it would be

<a href="whatsapp://send?abid=username&text=Hello%2C%20World!">whatsapp</a> 

once again sorry I can't test this. Also I have no idea what would happen if the username is the actual user of the current mobile device. eg. You try to whatsapp yourself.

like image 22
Steve Avatar answered Sep 21 '22 02:09

Steve