简体   繁体   English

whatsapp url scheme ios dev

[英]whatsapp url scheme ios dev

In the new version whatsapp implemented url scheme like 在新版本中,whatsapp实现了url方案

NSURL *whatsAppURL = [NSURL URLWithString:@"Whatsapp://"];

if ([[UIApplication sharedApplication] canOpenURL:whatsAppURL]) {

    [[UIApplication sharedApplication] openURL:whatsAppURL];

}

anyone knows if there is any action related to that? 谁知道有没有相关的行动? like create a new message? 喜欢创建新消息?

With the new iPhone v2.10.1 release WhatsApp now publicly supports its own url scheme. 随着新的iPhone v2.10.1发布,WhatsApp现在公开支持自己的网址方案。 Eg to open a new chat composer with the text "Hello World" you have to do this: 例如,要使用文本“Hello World”打开一个新的聊天作曲家,您必须这样做:

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

More information can be found in this FAQ on their site: http://www.whatsapp.com/faq/en/iphone/23559013 有关更多信息,请访问其网站上的常见问题解答: http//www.whatsapp.com/faq/en/iphone/23559013

The whatsapp:// URL scheme has been registered by WhatsApp, according to this answer , and you may be able to launch the WhatsApp application. 根据这个答案 ,WhatsApp已经注册了whatsapp:// URL方案,您可以启动WhatsApp应用程序。

Unfortunately, at date, there's no documentation available so it's not known whether there are useful actions associated with it. 不幸的是,到目前为止,还没有可用的文档,所以不知道是否有与之相关的有用操作。

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

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