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

2016-05-23  本文已影响768人  Lucaziki

做现在接手的应用时遇到一个需求,要求点击按钮跳转到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>

上一篇下一篇

猜你喜欢

热点阅读