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?
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.
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.
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.
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">
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With