1.
打开QQ推广网址 http://shang.qq.com 并用接收临时消息QQ号登录
2.
if([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"mqq://"]]) {
//用来接收临时消息的客服QQ号码(注意此QQ号需开通QQ推广功能,否则陌生人向他发送消息会失败)
NSString *QQ = @"xxxxx";
//调用QQ客户端,发起QQ临时会话
NSString *url = [NSString stringWithFormat:@"mqq://im/chat?chat_type=wpa&uin=%@&version=1&src_type=web",QQ];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];
}