到特定whatsapp联系人的网页链接 [英] Web link to specific whatsapp contact

查看:314
本文介绍了到特定whatsapp联系人的网页链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在网页上放置一个链接,用于打开与某个whatsapp联系人的WhatsApp聊天。换句话说:我想要一个通过whatsapp联系我的链接去到页面的联系我们的facebook / twitter / google + / etc链接旁边。例如:

  href =whatsapp:contact=015555555555@s.whatsapp.com& message =我想与您聊天


解决方案

我有一个优胜者(参见测试3),这里是每一个的结果:

(我认为测试3也适用于你是因为如果访问你的网站的人没有你的联系人列表,那么这是唯一的选择)。



在所有测试中,数字必须例如:


  • +55(011)99999-9999(NOT) li>
  • +5511999999999(YES)



在测试1和2上,它只能用加号测试1:

 < a href =whatsapp:// send?abid = phonenumber& text = Hello%2C%20World!>发送消息< / a> 

这样,您的联系人列表中必须包含电话号码。它不适合我,因为我希望能够发送消息给我的联系人列表中可能没有的号码。



如果您不在你的联系人列表中有号码,它会打开Whatsapp列出所有注册联系人,所以你可以选择一个。



这是一个很好的分享内容的选项。



测试2:

 < a href =intent:// send /phonenumber#Intent;scheme=smsto;package=com.whatsapp;action=android.intent.action.SENDTO;end\">发送消息< / a> 

此方法仅适用于Android 联系人列表。如果你没有它,Android会打开你的短信应用程序,所以你可以邀请联系人使用Whatsapp。



测试3 (赢家) strong>:

 < a href =https://api.whatsapp.com/send?phone=15551234567> ;发送消息< / a> 

这是完全为我工作的唯一方法。


  • 它适用于桌面上的Android,IOS和Web应用程序,

  • 您可以开始对话您的联系人列表中没有的号码



值得注意:




I'd like to place a link on a webpage which opens a whatsapp chat with a certain whatsapp contact. In other words: I want a "contact me by whatsapp" link to go next to the page's "Contact us my facebook/twitter/google+/etc" links. Something like:

href="whatsapp:contact=015555555555@s.whatsapp.com&message="I'd like to chat with you"

解决方案

I've tried many approaches and I have a winner (see Test 3), here is the result of each one:

(I think the Test 3 will also work for you because if the person visiting your site doesn't have you on their contact list, it's the only option that will allow it.)

In all tests the number had to be complete, with country and location code without any initial zeros. Example:

  • +55(011) 99999-9999 (NOT)
  • +5511999999999 (YES)

On tests 1 and 2 it only worked with a plus sign on country code: +5511999999999

Test 1:

<a href="whatsapp://send?abid=phonenumber&text=Hello%2C%20World!">Send Message</a>

This way you must have the phonenumber on your contact list. It doesn't worked for me because I wanted to be able to send a message to a number which I may not have on my contact list.

If you don't have the number on your contact list, it opens the Whatsapp listing all your registered contacts, so you can choose one.

It's a good option for sharing stuffs.

Test 2:

<a href="intent://send/phonenumber#Intent;scheme=smsto;package=com.whatsapp;action=android.intent.action.SENDTO;end">Send Message</a>

This approach only works on Android AND if you have the number on your contact list. If you don't have it, Android opens your SMS app, so you can invite the contact to use Whatsapp.

Test 3 (The Winner):

<a href="https://api.whatsapp.com/send?phone=15551234567">Send Message</a>

This was the only way that fully work for me.

  • It works on Android, IOS AND Web App on desktop,
  • You can start a conversation with a number that you don't have on your contact list

Worth notice:

这篇关于到特定whatsapp联系人的网页链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆