iOS开发 -键加入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", @"91810689",@"12c6396117742b18723396d8be4c68b38135f78a96a6eee4684722fe67a5d95b"]; NSURL *url = [NSURL URLWithString:urlStr]; if([[UIApplication sharedApplication] canOpenURL:url]){ [[UIApplication sharedApplication] openURL:url]; return YES; } else return NO; }

方法二:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://jq.qq.com/?_wv=1027&k=ad5ATx"]];

你可能感兴趣的:(iOS开发 -键加入qq群)