qq互联 - iOS里调起QQ聊天?
高洛峰
高洛峰 2017-04-17 17:12:10
0
3
760
高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(3)
小葫芦

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.delegate = self;
        [webView loadRequest:request];
        [self.view addSubview:webView];
        感谢你们的回复,已经找到答案了,不需要设置urlSchream,直接将上面的一段粘贴就好,中间换上指定的饿QQ号,就可以直接聊天了。
洪涛

schema

Ty80

The content is reproduced from http://wiki.open.qq.com/wiki/%E9%A6%96%E9%A1%B5

Another mqq:// You can directly activate QQ on your mobile phone, but I don’t know what the chat parameters are


4. WPA temporary session
The iOS SDK supports initiating a QQ temporary session to obtain the online status of the specified QQ account. To use the WPA function, you need to set up QQ business callbacks. Please refer to 6. Handling QQ business callbacks.
4.1 Initiate a temporary QQ session
The following is a sample code to initiate a temporary session to a specified QQ number:

- (void)onOpenWPA:(QElement *)sender {
    [self.view endEditing:YES];
    [self.root fetchValueUsingBindingsIntoObject:self];
    QQApiWPAObject *wpaObj = [QQApiWPAObject objectWithUin:self.binding_uin];
    SendMessageToQQReq *req = [SendMessageToQQReq reqWithContent:wpaObj];
    QQApiSendResultCode sent = [QQApiInterface sendReq:req];
    [self handleSendResult:sent];
}

See here for the Android method

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template