使用点击聊天发送WhatsApp消息

时间:2018-08-01 23:11:12

标签: whatsapi

是否可以使用点击聊天技术来发送WhatsApp消息,而无需单击已发送的“发送”按钮?

这里是链接https://wa.me/phonenumber?text=testinghttps://api.whatsapp.com/send?phone=phonenumber&text=testing或whatsapp:// send?phone = phonenumber&text = testing

假设我有一个桌面应用程序,可以打开HTTP URL从Web服务器上载或下载数据。我是否可以打开上面说https://wa.me/phonenumber?text=testing的URL(可能带有额外的url参数)以直接发送whatsapp消息?因为这将无法在浏览器上打开url,无法为您提供用于通过网络发送whatsapp消息的控件。Here is the page that you get redirected to

1 个答案:

答案 0 :(得分:0)

使用以下链接(仅适用于移动设备) whatsapp:// send?text = your_message&phone = 123456789

对于台式机,您可以使用 https://web.whatsapp.com/send?text=your_message&phone=123456789

您还可以使用javascript检查移动设备还是台式机

var ua = navigator.userAgent.toLowerCase();

var isMobile = ua.indexOf("mobile") > -1;

if (isMobile) {

    window.location.href = "whatsapp://send?text=your_message&phone=123456789;

} else {

    window.open("https://web.whatsapp.com/send?text=your_message&phone=123456789", "Share with Whatsapp Web", 'width=800,height=600');

}
相关问题