Adding WhatsApp Click to chat in HTML

Ever wonder how to add click to chat functionality on your Webpage, let’s do it :

how to add whatsapp click to chat in html

Being a developer, you might think that how you can start a whatsapp chat directly from a webpage. What is the HTML code for sharing on whatsapp. So, get your hands dirty we’re going to do that :

Step 1). Encode the Reciever’s whatsapp no. –

For Example the no. is 9876543210 and country code for India is +91

so, the encoded no. is 919876543210.

Step 2) Type the Message –

For Example the message is “Hi, This is Sam”

Note : You can also try plain text in message

Step 3) Place the hook :

create an <a> tag with href="
https://wa.me/whatsappphonenumber/?text=urlencodedtext

<a href=”https://wa.me/919876543210/?text=Hi Sam, Whatsup“>Click to Chat</a>

Code Example Whatsapp chat Html Code

Follow the simple steps to add whatsapp click to chat link in your website

Quick Tip : You can invite People to join your whatsapp group.

Go to Group Settings > invite via link. Send the link to people you want to join your whatsapp group

Reference links:
https://faq.whatsapp.com/en/android/26000030/

See Also : How to share a webpage on social media using Open Graph Potocol 

Add a Comment

Your email address will not be published. Required fields are marked *