ios开发,拉起QQ客服聊天

        NSString *urlStr = @"http://wpa.b.qq.com/cgi/wpa.php?ln=2&uin=QQ号码";
        UIWebView *webView = [[UIWebView alloc] init];
        NSURL *url = [NSURL URLWithString:urlStr];
        [webView loadRequest:[NSURLRequest requestWithURL:url]];
        [self.view addSubview:webView];

此外还需要在info.plist中添加权限

<key>LSApplicationQueriesSchemes</key>

<array>

<string>mqqwpa</string>

</array>

posted @ 2018-11-07 14:06  YouNeedCourage  阅读(521)  评论(0编辑  收藏  举报