目前安卓和ios测试都可直接点击对话。
mqqwpa://im/chat?chat_type=wpa&uin=312198990&version=1&src_type=web&web_src=badcatu.com
在浏览器中可以通过JS代码打开QQ并弹出聊天界面,一般作为客服QQ使用。而在移动端腾讯貌似没有公布提供类似API,但是却可以使用schema模式来启动手机QQ。
Android:
String
url=”mqqwpa://im/chat?chat_type=wpa&uin=501863587&version=1&src_type=web&web_src=badcatu.com”;
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
iOS:
UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectZero];
NSURL *url = [NSURL
URLWithString:@”mqq://im/chat?chat_type=wpa&uin=312198990&version=1&src_type=web&web_src=badcatu.com”];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
webView.delegate = self; [webView loadRequest:request]; [self.view
addSubview:webView];