How i get WhatsApp abid to compose a message to a specific user in iOS?

℡╲_俬逩灬. 提交于 2019-11-26 08:28:22

问题


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.

This is my code:

NSURL *whatsappURL = [NSURL URLWithString:@\"whatsapp://send?abid=XXX\"];
         if ([[UIApplication sharedApplication] canOpenURL: whatsappURL]) {
             [[UIApplication sharedApplication] openURL: whatsappURL];
         }

WhatsApp official link: https://www.whatsapp.com/faq/iphone/23559013


回答1:


Two recent solutions (July 2017)

  1. WhatsApp 'Click to Chat' API feature must work on all devices:

    https://faq.whatsapp.com/en/general/26000030

  2. And, this other schema (for href links) seems to be working also:

    whatsapp://send?text=MESSAGE&phone=+NUMBER&abid=+NUMBER



来源:https://stackoverflow.com/questions/35405872/how-i-get-whatsapp-abid-to-compose-a-message-to-a-specific-user-in-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!