简体   繁体   English

在 iOS 上使用 Whatsapp url scheme 调用

[英]Call Using Whatsapp url scheme on iOS

We can open conversation/chat window for WhatsApp by using URL Scheme:我们可以使用 URL Scheme 打开 WhatsApp 的对话/聊天窗口:

        if schemeAvailable("whatsapp://")
    {
        UIApplication.sharedApplication().openURL(NSURL(string: "whatsapp://send?abid=68")!)//68 is the example, addressbook contact id
    }
    else
    {
        UIApplication.sharedApplication().openURL(NSURL(string: "https://itunes.apple.com/app/whatsapp-messenger/id310633997")!)
    }

I want url scheme to start call?我想要 url 方案开始通话? I not found any documentation or reference for it either on WhatsApp official page or on any blog.我在 WhatsApp 官方页面或任何博客上都没有找到任何文档或参考。 Can we do this or its not possible?我们可以这样做还是不可能?

Currently Whatsapp doesn't have URL Scheme for Call feature.目前 Whatsapp 没有呼叫功能的 URL Scheme。

But it does have custom URL scheme to chat with a specific contact.但它确实有自定义 URL 方案来与特定联系人聊天。

You can keep checking more at : https://www.whatsapp.com/faq/en/iphone/23559013 .您可以继续查看更多信息: https : //www.whatsapp.com/faq/en/iphone/23559013

You can use the following url to directly open contact and use您可以使用以下网址直接打开联系人并使用

click to chat feature点击聊天功能

on whatsapp to any contact number在whatsapp到任何联系号码

UIApplication.sharedApplication().openURL(NSURL(string: "whatsapp://send?phone=15551234567")!)

see that also https://faq.whatsapp.com/en/android/26000030/?category=5245251另见https://faq.whatsapp.com/en/android/26000030/?category=5245251

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM