在iOS上打开whatsapp,预先填写新的电话号码 [英] Open whatsapp on iOS with new phone number pre-filled

查看:311
本文介绍了在iOS上打开whatsapp,预先填写新的电话号码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有与whatsapp沟通的方案,如:

I know there is scheme to communicate with whatsapp like:

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

但是我找不到如何用电话号码打开whatsapp以前不存在。

But i can't find how to open whatsapp with a phone number that don't exist before.

这是contatc us页面,如果我只能打开whatsapp而无法预先填写电话号码,那就没用了。我需要联系whatsapp ...

It's for a "contatc us" page and if i can only open whatsapp and can't pre fill a phone number, it's useless. I need to be contacted with whatsapp...

我想做的是否存在?

推荐答案

预先填写的电话号码和文字

For phone number pre-filled And Text

   NSURL *whatsappURL = [NSURL URLWithString:@"https://api.whatsapp.com/send?phone=9530670491&text=hello"];
if ([[UIApplication sharedApplication] canOpenURL: whatsappURL]) {
    [[UIApplication sharedApplication] openURL: whatsappURL];
}

点击此处获取 Swift

检查链接了解更多详情 https://www.whatsapp.com/faq/en/general/26000030

Check Link For More Details https://www.whatsapp.com/faq/en/general/26000030

这篇关于在iOS上打开whatsapp,预先填写新的电话号码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆