ios - 在 iOS 中是否可以通过 WhatsApp 将文本发送到特定的联系号码?

标签 ios objective-c whatsapp

是否可以通过 WhatsApp 向特定联系电话发送短信?

我看到了这个问题:Share image/text through WhatsApp in an iOS app但它太旧了,没有关于发送给特定联系人的答复。

我也知道这个链接:https://www.whatsapp.com/faq/en/iphone/23559013

谢谢!

最佳答案

向特定联系人发送 whatsapp 消息:

    NSURL *whatsappLink = [NSURL URLWithString: @"whatsapp://send?phone=+913932143213&text=Hello%2C%20World!"];
    if([[UIApplication sharedApplication] canOpenURL: whatsappLink]){
           [[UIApplication sharedApplication] openURL: whatsappURL];
    }

关于ios - 在 iOS 中是否可以通过 WhatsApp 将文本发送到特定的联系号码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37037499/

相关文章:

objective-c - 图片不想拖

ios - NSString 中的内存泄漏 stringWithUTF8String : with ARC enabled

javascript - 如何制作 `text + line-break + link` 以在 Whatsapp 上分享?

ios - 图像仅在 swift 3 中的 Whatsapp 上共享

ios - 使用 Realm 对象保存用户

ios - CoreData 防止更新时崩溃

ios - AudioUnit编程iOS iPhone 6s播放音频后audiounitrender报错50

html - 缩略图和说明未显示在 Whatsapp 预览链接上

ios - 无法访问字典中的键

ios - 如何使用 Swift iOS 向 UIAlertView 按钮添加操作