// uin=2977046873为QQ号
NSString *urlString = @"mqq://im/chat?chat_type=wpa&uin=2977046873&version=1&src_type=web";
if([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:urlString]])
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString]];
生成QQ群代码地址:http://qun.qq.com/join.html
- (BOOL)joinGroup:(NSString *)groupUin key:(NSString *)key{
NSString *urlStr = [NSString stringWithFormat:@"mqqapi://card/show_pslcard?src_type=internal&version=1&uin=%@&key=%@&card_type=group&source=external",@"60406328",@"be69685ae8dcd060c1fc916a7da0f117afc9c219553262efee68ff00682b4bf3"];
NSURL *url = [NSURL URLWithString:urlStr];
if([[UIApplication sharedApplication] canOpenURL:url]){
[[UIApplication sharedApplication] openURL:url];
return YES;
}
else return NO;
}