I want to send a text message ("e.g. Hello World") to a particular whatsapp user from my app.
Base on this whatsapp FAQ link, I can just use the custom URL scheme to launch whatsapp to a particular contact number with a predefine text:
Question:
1) But where to get the contact ID, abid?:
2) How do I know if the contact number has whatsapp in the first place [for iOS we can't access it because of sandbox limitation right?] ?
3) How to insert the contact ID into the URL:
NSURL *whatsappURL = [NSURL URLWithString:@"whatsapp://send?text=Hello%2C%20World!"];
if ([[UIApplication sharedApplication] canOpenURL: whatsappURL]) {
[[UIApplication sharedApplication] openURL: whatsappURL];
}