美文网首页
iOS应用内调用QQ打开指定用户聊天窗口

iOS应用内调用QQ打开指定用户聊天窗口

作者: Lucaziki | 来源:发表于2016-05-23 16:17 被阅读768次

做现在接手的应用时遇到一个需求,要求点击按钮跳转到QQ的客服QQ页面。具体实现代码如下:

<pre><code>
UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectZero];
NSURL *url = [NSURL URLWithString:@"mqq://im/chat?chat_type=wpa&uin=QQ号&version=1&src_type=web"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[webView loadRequest:request];[self.view addSubview:webView];
</code></pre>

相关文章

网友评论

      本文标题:iOS应用内调用QQ打开指定用户聊天窗口

      本文链接:https://www.haomeiwen.com/subject/rhbarttx.html