快速打开特定号码上的Whatsapp [英] Open Whatsapp on a particular number in swift

查看:443
本文介绍了快速打开特定号码上的Whatsapp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在whatsapp中打开特定的联系人聊天,但没有任何解决方案.请帮助我完全陷入困境.我已经尝试过了:

I am trying to open a particular contact chat in whatsapp but not getting any solution. Please help i am totally stuck. I have tried this:

let whatsAppURL: NSURL = NSURL(string: "whatsapp://send?abid=\(primary)&;text=lOL;")!
        if UIApplication.sharedApplication().canOpenURL(whatsAppURL){
            UIApplication.sharedApplication().openURL(whatsAppURL)
        }

推荐答案

按照此 whatsapp论坛链接,您无法向特定用户发送消息,这在whatsapp URL方案中不可用.

As per this whatsapp forum link, there is no way you can send message to specific user, this is not available within whatsapp URL scheme.

您只需设置预定义的消息,然后使用URL方案就可以打开whatsapp最新控制器.

You just set predefined message and then with URL scheme you are able to open whatsapp recent controller.

这篇关于快速打开特定号码上的Whatsapp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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