[英]objective-c share image to Instagram from my iOS application
[英]How to make whats app Voice calls from my IOS Application in Objective-C
我正在使用IOS应用程序从我的应用程序发送whatsapp调用。 我试图让消息源打电话,但一无所获。 谁能建议我一些有关WhatsApp语音通话的信息。
但是我知道whatsapp没有发布api来从IOS中的其他应用程序进行调用。
您无法直接通过应用程序拨打WhatsApp的电话。 您可以使用以下代码重定向到特定的联系人聊天线程:
NSURL *whatsappURL = [NSURL URLWithString:@"whatsapp://send?phone=+91ContactNumberHere"];
if ([[UIApplication sharedApplication]canOpenURL:whatsappURL]) {
[[UIApplication sharedApplication]openURL:whatsappURL options:@{} completionHandler:nil];
} else {
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Error" message:@"Whatsapp is not installed on your device." preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleCancel handler:nil];
[alert addAction:okAction];
[self presentViewController:alert animated:true completion:nil];
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.