我如何让WhatsApp abid为iOS中的特定用户撰写邮件? [英] How i get WhatsApp abid to compose a message to a specific user in iOS?
问题描述
我如何让WhatsApp abid向特定用户撰写邮件?我想在我的应用程序中选择联系人时发送短信。
How i get WhatsApp abid to compose a message to a specific user ? i want to send a text message when i select a contact in my app.
这是我的代码:
NSURL *whatsappURL = [NSURL URLWithString:@"whatsapp://send?abid=XXX"];
if ([[UIApplication sharedApplication] canOpenURL: whatsappURL]) {
[[UIApplication sharedApplication] openURL: whatsappURL];
}
WhatsApp官方链接:
https://www.whatsapp.com/faq/iphone/23559013
WhatsApp official link: https://www.whatsapp.com/faq/iphone/23559013
推荐答案
两个最近的解决方案(2017年7月)
Two recent solutions (July 2017)
-
WhatsApp'点击聊天'API功能必须适用于所有设备:
WhatsApp 'Click to Chat' API feature must work on all devices:
https://faq.whatsapp.com/en/general/26000030
并且,这个其他架构(对于 href
links)似乎也在起作用:
And, this other schema (for href
links) seems to be working also:
whatsapp:// send?text = MESSAGE& phone = + NUMBER& abid = + NUMBER
whatsapp://send?text=MESSAGE&phone=+NUMBER&abid=+NUMBER
这篇关于我如何让WhatsApp abid为iOS中的特定用户撰写邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!