How to create whatsApp share button ?

Hello everyone,
Can someone help me it’s look like basic to me but still didnt find a solution.
I’m trying to add a share page button of WhatsApp Aplication.
I try to find a solution with out a code involved but didn’t find.
Can someone help ?
Thanks in advanced.

3 Likes

Hi,
There is no need to use wixcode for this. You can just search the web for whatsapp sharing code and add it to an html component in your web site

thanks for your answer i know this but how can I do this with an Icon and not HTML Text Line…
thanks again

I am looking to add Share on Whatsapp Button for My Blog, it should be able the share my individual blog post. Can any one please help?

3 Likes

I am also looking for a solution to add whatsapp share button to the blog post…Please somebody help us

I have the same query, I want to share individual page to whatsapp is there any automatic way instead of manually writing the links

Even I am looking for this solution. As we are journalists. Our articles need to be shared by the reader instantly on whatsapp, linkedin . I am in need of it desperately. I dont know any coding. So what is the html code or wixcode anything please help

It’s pretty easy.
Add a styled button to the the article page.
Set the button icon to be Whatsapp icon.
And use code to add the Whatsapp Link.
For example, let’s say each artcile has it’s own URL (for example when you use a dynamic page per article). Then you can do (on page code):

import wixLocation from 'wix-location';
$w.onReady(() => {
$w('#whatsappButton').target = '_blank';//to open in a new tab
$w('#whatsappButton').link = `https://api.whatsapp.com/send?phone=&text=${wixLocation.url}`;
})

How do I use the above code. Do I paste it in the HTML embed code. If it is that then its not working

Do i use the above code and paste it in the html embed…Please let me know how to link the code?