1

I'm using openURL to send a text to a WhatsApp contact from my app, But when I use this code, open WhatsApp and then I need press to send into WhatsApp app. Could be possible send this without open WhatsApp?

I have the abid contact and the text, but i don't like open WhatsApp and then press send button. Is this possible?

  NSURL *whatsappURL = [NSURL URLWithString:@"whatsapp://send?abid=123&text=Hello%2C%20World!"];
  if ([[UIApplication sharedApplication] canOpenURL: whatsappURL]) {
      [[UIApplication sharedApplication] openURL: whatsappURL];
  }
modusCell
  • 13,151
  • 9
  • 53
  • 80
user3745888
  • 6,143
  • 15
  • 48
  • 97

1 Answers1

0

Two recent solutions (July 2017)

I've found, tested and refered two new different solutions in THIS OTHER ANSWER, one is through an official Whatsapp API (because S.O. policies I had to put a link to the solution, no duplicates).

DavidTaubmann
  • 3,223
  • 2
  • 34
  • 43