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
Two recent solutions (July 2017)
WhatsApp 'Click to Chat' API feature must work on all devices:
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