Reference: http://blog.csdn.net/syz8742874/article/details/39271117
Problems:
1.QQ space sharing cannot be opened without error, but it is not open page
Note: It is possible that you have written this code
Private voidSharetoqzone () {//Share Typeparams.putstring (Qzoneshare.share_to_qq_key_type,share_to_qzone_type_image_text); Params.putstring (Qzoneshare.share_to_qq_title,"title");//must fill inParams.putstring (qzoneshare.share_to_qq_summary, "abstract");//Optional FillParams.putstring (Qzoneshare.share_to_qq_target_url, "Jump URL");//must fill in params.putstring (qzoneshare.share_to_qq_image_url, "Picture link ArrayList"); Mtencent.sharetoqzone (activity, params,NewBaseuilistener ());}
you notice here the params.putstring (qzoneshare.share_to_qq_image_url, "Picture link ArrayList");
This is wrong, because it's written like this.
arraylist<string> imageurls = new arraylist<string> ();
Imageurls.add ("Https://pic.cnblogs.com/avatar/677455/20150707171133.png");
params. putstringarraylist (qzoneshare.share_to_qq_image_url,imageurls);
The back is a collection, not a string.
This should be the code.
/*** Share to QQ space*/ Public Static voidSharetoqzone (Context Context,iuilistener listener) {//Share Type FinalBundle params =NewBundle (); Params.putint (Qzoneshare.share_to_qzone_key_type,qzoneshare.share_to_qzone_type_image_text); Params.putstring (Qzoneshare.share_to_qq_title,"title");//must fill inParams.putstring (qzoneshare.share_to_qq_summary, "abstract");//Optional FillParams.putstring (Qzoneshare.share_to_qq_target_url, "http://www.qq.com/news/1.html");//must fill in arraylist<string> imageurls = new arraylist<string> (); Imageurls.add ("Https://pic.cnblogs.com/avatar/677455/20150707171133.png"); params.putstringarraylist (qzoneshare.share_to_qq_image_url,imageurls); Mtencent.sharetoqzone (Activity) context, params, listener); }
The argument is list and params.putstringarraylist () instead of params.pustring ();
Android integrated QQ Interconnect (login, share)