WhatsApp Messenger is one of the most popular messaging apps and you must be having it right now on your phone. Since WhatsApp is now available on web, it’s important for you to add it as a part of your internet/online marketing & promotions. Its one of the familiar app in all mobile phone that you can’t see the mobile phone without WhatsApp Messenger. Nowadays everybody is using the social share feature on their website with popular social network like Facebook, Twitter and Google Plus. Now, Here is the code snippet below to add WhatsApp Share Button for website that allows you to share on WhatsApp Messenger.
Demo
Code Snippets
<!-- WhatsApp Share Button By niralar.com --> <a href="whatsapp://send?text=https://niralar.com" data-action="share/whatsapp/share">Share via Whatsapp</a> <!-- /WhatsApp Share Button By niralar.com -->
if i’m pass some value from form using get method then the url is not fully share. how to solve that problem.
I’m not sure your concern fully. You can share by dynamically generating the above code.
Hi ,
Clicked on demo button , it’s not showing share preview like in above screenshot , I meant logo is not displaying, I need to display it in my website share . Please suggest me
Hi Jayanth,
Check that the link your sharing has preview image or add the below code on your website.
<meta property=”og:image” content=”your_image_url” >
Thanks,
Siva
sir i have a web page in php which i want to share on whata app and when the user press the share button on the same time my facebook page should be liked if it is possible the rply me
Yes, You can do this on JavaScript
How to share a web page(created in mobile) in whats app which will displayed by clicking a link
Hi Suresh,
Same for all web pages !!
Thanks,
thanks dear i am searching this method from long time…..
now its working….
thanks SIVA SANKAR
Regards
Lalkrishna
Nice…………super easy
But is any ways that it only appear on mobile device, not in desktop .
currently i am creating own social share button as per my requirement and also other plugins in wordpress load and increase size unnecessary.
so thanx
And please add other social button mathod like FB google etc
Thank you !!
To Appearance only in mobile you restrict either by using screen size in CSS or JS.
Hi Siva,
Nice code description. But how can we pass a variable, something like “Share via Whatsapp”
Regards,
Just Use
Hello,
Is it possible to generate a link to include it on a pdf, so when the person click on the link, he can share something on whatsapp? If it is possible, how do I accomplish that?
Thank you very much!!!!
Hi Yulia,
No, It won’t works.. 🙂
Thanks,
Siva
It’s very helpful, Thanks a lot. I want to show some description text with link. How can i add?
It’s similar on the above
I am looking for button on each post to automatically prepopulating each posts body as sms & whatsapp for my wordpress site. how can i do this? I can pay for this if you give me step by step solution.
Hi Kailash,
Instead of static text provide it as dynamic.
Thanks,
Siva
Hi sir,
How to send message in whatsapp dynamic numbers and dynamic message through php. please provide demo
Thanks,
Dinesh
Hi Dinesh,
Message or Share ?
Hi Sr, It works perfectly. Thankssss
I’m still looking for something. I need to get some response when the message been sent. What i want to know is if the user really shared the information.
Tanks in advance for your help.
FD
You need to write a JS on click of share button
Hi, sr. Thanks for your help.
I’v tried many diferent ways and i’m still don’t get with the expected result.
Do you know how to do it?
Thanks! (Y)
While clicking on the button you need to save the user details on the server.
How to share dyanamic value in whatsapp message …..there generate the image and tittle from meta tags….then how we dyanamic the meta tags for different times to coms different values
Thank you very sir much for such a great coding help.
Can we add a predefault number with whom we want to share on this along with some additional text?
No, We can’t
thanks, dear, i am searching this method from a long time…..
now it’s working….
thanks sir for this code it is very easy to use…
I have implemented share link from website to WhatsApp but I also want want to share image.
It is possible to share image from website to WhatsApp ?
No, We can’t
How do you added the “Share This” button.. any plugin used?
Its Jetpack
thanks bro
Welcome 🙂
How to share an image from my website to whatsapp?
You can share image as link
sir, we are developing web page in angualr js..in that we have share option to share the medias and content to social networks. while opening the page i’m updating the metadata in index.html..but while sharing, it is not taking that values.simple showing metadata.title like that..could you please tell me how to get metadata angular js
Keerthana,
You need a render your metadata from the server, Which means before your AngularJS / Javascript loads. because crawler will not load you entire website.
Just try,
https://github.com/720kb/angular-socialshare
As this question is not relevant to this article, You can post your questions @ https://stackoverflow.com/
Thanks,
Siva
hi, the whatsapp share link your provide doesn’t support hindi language text on share.. its some unicode characters.. how can i solve it.
hi sir,
i had developed an e-commerce website and I need apply a whatsapp share button in this website.the website is purely php along with json,jquery etc… will u please suggest me to how can I only share the image of a product from this website to the whatsapp. please reply me.
Sharafu, You can share only URL on Whatsapp, I can be either Image/Page URL
Thanks,
Siva
HI
i am mohan i just want to whatsapp share functionality in my website using Angular 4+ . if i click button in from https://web.whatsapp.com/ it has to send that website title and image, discription. do have any idea about this??. if you have please let me know how to do.
very nice bro i search some day ago but not result only missing data-action
I want to share dynamic images + product data in angular through whatsapp
I want to share images and videos from our website using web whatsapp.