iphone Code:
-(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 ", @" 481902374 ", @" 1afff3c09c8dd6b8a1328cb856133fe608a9469a6c8dfe69f33fa1e6c6d0cbf8 "]; Nsurl *url = [Nsurl urlwithstring:urlstr];if ([[UIApplication sharedapplication] canopenurl:url]) {[[UIApplication Sharedapplication] Openurl:url];return YES;} else return NO;}
Android Code:
/****************** initiates the addition of the group process. Group number: Online shopping leaderboard User Group (481902374) The key is:-kyqk4rolutxwdpyhqri-siqw7p3fjhp* call Joinqqgroup (-KYQK4ROLUTXWDPYHQRI-SIQW7P3FJHP) Can initiate the hand Q client application Add Group network Purchase Leaderboard User Group (481902374) * * @param key generated by the official website key* @return Return True indicates that the call to start Q is successful, the return fals indicates that the call failed ******************/ public boolean Joinqqgroup (String key) { Intent Intent = new Intent (); Intent.setdata (Uri.parse ("Mqqopensdkapi://bizagent/qm/qr?url=http%3a%2f%2fqm.qq.com%2fcgi-bin%2fqm%2fqr%3ffrom %3dapp%26p%3dandroid%26k%3d "+ key)); This FLAG can be customized according to the specific product needs, such as set, then in the Add group interface press back, return to the main interface of the hand Q, do not set, press return will return to the call product interface //intent.addflags (intent.flag_activity_new_ TASK) try { startactivity (intent); return true; } catch (Exception e) { //Do not install lot Q or the installed version does not support return false; }}
Page code:
<a target= "_blank" href= "http://shang.qq.com/wpa/qunwpa?idkey= 1afff3c09c8dd6b8a1328cb856133fe608a9469a6c8dfe69f33fa1e6c6d0cbf8 "></a>
Reference: http://qun.qq.com/join.html
QQ Add group Components-iphone, Android, Web page added QQ group