share a link on whatsapp from website
We can add whatsapp sharing button to our website just like facebook,twitter,g+ etc. and share the content to whatsapp contacts or groups. This is tested in iphone and android version 2.3.6. We may require latest whatsapp installed on phone. Lets see an example:
This is tested from android version 2.3.6 and iphone, incase if it doesn't work then update latest version of whatsapp then give a try.
DEMO (Click below link if you visiting from mobile/tablet)
Click to share on whatsapp
UPDATE:Whatsapp share link with images
<a href="whatsapp://send?text=http://webdevelopmentscripts.com">Share on whatsapp</a>When you click on this link in mobile, if you installed whatsapp then it opens your whatsapp contact list for sharing from there you can share the content
This is tested from android version 2.3.6 and iphone, incase if it doesn't work then update latest version of whatsapp then give a try.
DEMO (Click below link if you visiting from mobile/tablet)
Click to share on whatsapp
UPDATE:Whatsapp share link with images
Above article just shows plain url with text while sharing in whatsapp. If you want to show rich preview of the link in whatsapp, checkout this link:
Watsapp share link with images
Watsapp share link with images
Comments (24)
Mohit -
September 18, 2020
wow worked for me
KANAK TECHNOLOGY -
April 30, 2020
Thank you very much.
Kunal -
December 30, 2019
I was disappointed while trying it in the web browser, But I am Now Darnnn Happy that it works on Android Devices. Thank You So Much WebScript. I Love this Site. Keep Posting the Original Such Contents. I am vry thnkful to You.
Harshavardhan C -
October 22, 2023
Happy to hear this
Rr -
November 12, 2018
Can I put php code instead of a specific link? I would like to share the link of the product
Andrew -
July 08, 2018
Very Good Knowledge video.
Rahul Kumar -
June 20, 2018
How to add whatsapp image to share any whatsapp status from website?
Tal -
October 24, 2017
Hello, I would like to embed the code that you mentioned, but I want to pull the current URL of my site. Can you tell me please how to do this?
WDS -
October 24, 2017
You can assign current URL to any JavaScript variable and replace the URL mentioned in the example with that JavaScript variable. Ex: var current_url = document.URL;
Manish -
June 12, 2017
how to share in heading using whats up share .. ex. title in news
WDS -
June 20, 2017
Follow this article: http://webdevelopmentscripts.com/80-whatsapp-share-link-with-image-in-websites
Amy -
January 06, 2017
How to add an image along with the text to be shared
WDS -
January 11, 2017
You just need to add four meta tags to your web page to make it happen. Check out this link: http://webdevelopmentscripts.com/80-whatsapp-share-link-with-image-in-websites
Amy -
January 06, 2017
How to add an image along with the text to be shared
Farhan -
December 27, 2016
is there anyway to do this for a web application (not mobile website)
Pradeep -
November 25, 2016
is it possible to share a image from website uploaded with any file name? how?
Xy -
November 16, 2016
How to make it unable to click if is using pc but able to click if is using mobile?
WDS -
November 18, 2016
Instead making it unclickable, you can hide it by default and show only in the mobile, tablet kind of devices by using CSS media queries
Gaurav Sable -
October 31, 2016
HOW WE CAN DO THIS WITH A WHATAPP IMAGE LIKE, WE UPLOAD A IMAGE SAYING "SHARE ON WHATAPP" AND BY CLICKING IT WE SHARE IT
WDS -
November 01, 2016
Just put the image tag inside the anchor tag, so by clicking the image trigger the watsapp sharing...
Thiago -
September 13, 2016
Thanks!
Patel nilay -
September 10, 2016
yas
Jrc -
September 04, 2016
Heghh
Aditya -
July 14, 2016
worked like a charm! thanks!