0

Here i am doing sharing some details WHATSAPP from my WEBSITE , for this i searched lot but i didn't my answer, if any one know means please update my code,Please see below after searching i used this code but it not working

I tried like this

    <a href="https://web.whatsapp.com/send?phone=9986128665&text=I'm%20interested%20in%20your%20car%20for%20sale
 ">Share To WhatsApp</a>
Funk Forty Niner
  • 74,450
  • 15
  • 68
  • 141
kumaran jayam
  • 33
  • 1
  • 2
  • 8

3 Answers3

3
Just saw it on a website and seems to work on latest Android with latest chrome and whatsapp now too! Give the link a new shot!

<a href="whatsapp://send?text=The text to share!" 
data-action="share/whatsapp/share">Share via 
Whatsapp</a>

Rechecked it today (17th April 2015):

Works for me on iOS 8 (iPhone 6, latest versions) Android 5 (Nexus 5, latest versions).

It also works on Windows Phone.

1

Use https://**api**.whatsapp.com not https://**web**.whatsapp.com

<a href="https://api.whatsapp.com/send?phone=9986128665&text=I'm%20interested%20in%20your%20car%20for%20sale
 ">Share To WhatsApp</a>

Have you searched in WhatsApp official website?

If you want to share to WhatsApp, skip the phone=[number] part.

The phone=[number] is for you to start a new chat with that number, which will lose the function to share/forward.

yqlim
  • 6,898
  • 3
  • 19
  • 43
  • I removed number means it is going like whatsapp chating but i don't want like , i need like i want to share the details – kumaran jayam Apr 06 '18 at 13:54
  • @kumaranjayam mate have you even tried clicking on your current `href`? With `phone=[number]` you are definitely starting a chat, not sharing/forwarding your `text=blablabla` – yqlim Apr 06 '18 at 13:57
  • @kumaranjayam just open a new tab and copy paste your link and see what happens – yqlim Apr 06 '18 at 13:58
  • I tried like this ` – kumaran jayam Apr 06 '18 at 14:07
  • '@kumaranjayam just open a new tab and copy paste your link and see what happens', i tried like it is showing only text,i want image and text how can do ? – kumaran jayam Apr 06 '18 at 14:19
1

Your code is right, but only if the user has Whatsapp installed on the same device where it's watching your website.

On the contrary, it has to install Whatsapp on its device first to start messaging.

PS: replace https://web.whatsapp.com with https://api.whatsapp.com and it will work like a charm on every device.

NotSoSnake
  • 46
  • 6
  • I logged in my whatsapp account from my system(localhost) and i tried to send message to another number,this way we can achive or not ? – kumaran jayam Apr 06 '18 at 13:49
  • I tried like this ` Share To WhatsApp`, it is going only the website link, for me it should go index page image , if i am clicking link means it should redirect to that website – kumaran jayam Apr 06 '18 at 14:06
  • Can you please update your code, how to share the image and text details – kumaran jayam Apr 06 '18 at 14:15
  • @kumaranjayam In the href you have to include the phone number with phone=9986128665 so your code will be `Share To WhatsApp`. It will send a message to the number 9986128665 with the text http://www.srisankaramatrimony.com/ – NotSoSnake Apr 06 '18 at 14:17
  • @kumaranjayam how can we send images to whatsapp, if image is on my server. I want a functionality on a button click where I can create a image and then it should be shared on whatsapp. – bhavikshah28 Sep 04 '18 at 05:05