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:
 
<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

 


Comments (24)
  1. Image
    Mohit - Reply

    September 18, 2020

    wow worked for me

  2. Image
    Kunal - Reply

    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.

  3. Image
    Rr - Reply

    November 12, 2018

    Can I put php code instead of a specific link? I would like to share the link of the product

  4. Image
    Andrew - Reply

    July 08, 2018

    Very Good Knowledge video.

  5. Image
    Rahul Kumar - Reply

    June 20, 2018

    How to add whatsapp image to share any whatsapp status from website?

  6. Image
    Tal - Reply

    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?

    • Image
      WDS - Reply

      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;

  7. Image
    Manish - Reply

    June 12, 2017

    how to share in heading using whats up share .. ex. title in news

    • Image
      WDS - Reply

      June 20, 2017

      Follow this article: http://webdevelopmentscripts.com/80-whatsapp-share-link-with-image-in-websites

  8. Image
    Amy - Reply

    January 06, 2017

    How to add an image along with the text to be shared

    • Image
      WDS - Reply

      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

  9. Image
    Amy - Reply

    January 06, 2017

    How to add an image along with the text to be shared

  10. Image
    Farhan - Reply

    December 27, 2016

    is there anyway to do this for a web application (not mobile website)

  11. Image
    Pradeep - Reply

    November 25, 2016

    is it possible to share a image from website uploaded with any file name? how?

  12. Image
    Xy - Reply

    November 16, 2016

    How to make it unable to click if is using pc but able to click if is using mobile?

    • Image
      WDS - Reply

      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

  13. Image
    Gaurav Sable - Reply

    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

    • Image
      WDS - Reply

      November 01, 2016

      Just put the image tag inside the anchor tag, so by clicking the image trigger the watsapp sharing...

  14. Image
    Aditya - Reply

    July 14, 2016

    worked like a charm! thanks!

Leave a Comment

loader Posting your comment...