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 this link if you visiting from mobile/tablet

Click to share on whatsapp

 


Comments (8)
  1. 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

  2. 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...

  3. Image
    Aditya - Reply

    July 14, 2016

    worked like a charm! thanks!

Leave a Comment

loader Posting your comment...