Android integrated QQ Interconnect (login, share)

Source: Internet
Author: User

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)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.