简体   繁体   English

href whatsapp链接到数字

[英]href whatsapp link to number

I'm having an issue trying to send Whatsapp messagges through browser using this code: 我在尝试使用以下代码通过浏览器发送Whatsapp消息时遇到问题:

<a href="intent://send/+390123456789#Intent;scheme=smsto;package=com.whatsapp;action=android.intent.action.SENDTO;end">click</a>

Using this code, Whatsapp opens correctly but the number is not recognized (i'm trying with my number, which is registered in Whatsapp) saying something like "You're trying to reach a non-Whatsapp number. Invite him or send SMS". 使用此代码,Whatsapp可以正确打开,但是无法识别该号码(我正在尝试使用我的号码,该号码已在Whatsapp中注册),上面写着“您正在尝试拨打非Whatsapp号码。邀请他或发送短信” 。

My international code (Italy) is +39. 我的国际代码(意大利)是+39。 I've tried 003912345, +3912345, 3912345, 12345, but with no success. 我尝试过003912345,+ 3912345、3912345、12345,但没有成功。

Anyone experienced this? 有人经历过吗? Thanks for the help! 谢谢您的帮助!

You get the message"You're trying to reach a non-Whatsapp number. Invite him or send SMS" because the number you want to use for sending the message to must be present into your phone contact list. 您收到消息“您正在尝试拨打非Whatsapp号码。邀请他或发送短信”,因为您要用于发送消息的号码必须出现在您的电话联系人列表中。

Anyway the attached code you use for the link won't work on iOS. 无论如何,您用于链接的附加代码在iOS上无法使用。

Try to use: href="whatsapp://send/?text=<>" data-action="share/whatsapp/share" . 尝试使用:href =“ whatsapp:// send /?text = <>” data-action =“ share / whatsapp / share”。 The link will open WhatsApp but you will have to manually select the consignee of the message from your contact list, otherwise you could use the ABID code to send the message directly to your contact. 该链接将打开WhatsApp,但您必须从联系人列表中手动选择邮件的收货人,否则,您可以使用ABID代码将邮件直接发送给您的联系人。

Here you'll find more info about this technique: https://www.macstories.net/tutorials/use-whatsapps-url-scheme-with-drafts-launch-center-pro-or-a-bookmarklet/ 在这里,您将找到有关此技术的更多信息: https : //www.macstories.net/tutorials/use-whatsapps-url-scheme-with-drafts-launch-center-pro-or-a-bookmarklet/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM