javascript - Can I send a Image to whatsApp using html hyperlinka tag? - Stack Overflow

I know that we can send a text message using HTML anchor tag, with the following code:<a href="

I know that we can send a text message using HTML anchor tag, with the following code:

<a href="whatsapp://send?text=Hello%20World!">Hello, world!</a>

or <a href="!">Hello, World!</a>

But, now if I want to send an image attachment, how can I do that?

I know that we can send a text message using HTML anchor tag, with the following code:

<a href="whatsapp://send?text=Hello%20World!">Hello, world!</a>

or <a href="https://web.whatsapp./send?text=Hello%20World!">Hello, World!</a>

But, now if I want to send an image attachment, how can I do that?

Share Improve this question edited Jan 10 at 19:22 Codemaster United 3812 silver badges18 bronze badges asked Feb 7, 2022 at 17:03 MILAN SAHANAMILAN SAHANA 961 silver badge11 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 4

U can't. The closest to it would be to send a link in the message that has a image preview, but that's not that usefull. I'm guessing this wouldn't even be possible to add in whatsapp because to access a user file like an image I believe this has to be done with a direct user interaction (like manually selecting the image), but not by clicking a link, just by doing that whatsapp can't get the image from user storage.

Use WhatsApp Business API. You must create an app on Facebook developer panel (https://developers.facebook.) and add WhatsApp as a product. Then configure api settings and add WhatsApp api web hooks in order to receive replies etc. Configurations on your app or website will depend on what kind of messages(e.g images, audio) you want to send to ur customers.

I guess it would be like this if you are trying to create an image which acts like a link

<a href="https://web.whatsapp./send?text=Hello%20World!"><img src="myCoolImage.png" width="500" height="500"></a>

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745648759a4638131.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信