Android Sina Blog Share issues summary

Source: Internet
Author: User

Classification:Android (+)

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Directory (?) [-]

    1. I encounter bug 1 SSO package or SINGN error
    2. BUG2 SSO Login Authorization code does not go into class Authlistener OnComplete method
    3. BUG3 No permissions added
    4. BUG 4 callback address is different

Weibo development encountered a lot of bug summary

I'm having a bug (1): SSO package or SINGN error

This problem arises when I do not fill in the correct package name and MD5 signature in the blog

Need to use the MD5 signature Generator in the official compression pack; Enter your app's package name to get your signature

Bug (2): SSO Login Authorization Code does not go into Class Authlistener OnComplete () method

The reason I came up with this bug is that I didn't join Onactivityresult ()

As follows

[Java]View PlainCopy 
  1. /**
  2. * This function is called when the SSO authorization Activity exits.
  3. *
  4. * @see {@link Activity#onactivityresult}
  5. */
  6. @Override
  7. protected void Onactivityresult (int requestcode, int resultcode, Intent data) {
  8. Super.onactivityresult (Requestcode, ResultCode, data);
  9. //SSO Authorization callback
  10. //IMPORTANT: Activity that initiates SSO login must rewrite Onactivityresult
  11. if (mssohandler! = null) {
  12. Mssohandler.authorizecallback (Requestcode, ResultCode, data);
  13. }
  14. }
BUG (3): No permissions added[Java]View PlainCopy 
    1. <uses-permission android:name="Android.permission.INTERNET"/>
    2. <uses-permission android:name="Android.permission.ACCESS_WIFI_STATE"/>
    3. <uses-permission android:name="Android.permission.ACCESS_NETWORK_STATE"/>
    4. <uses-permission android:name="Android.permission.WRITE_EXTERNAL_STORAGE"/>


BUG (4): Callback address is different[Java]View PlainCopy
    1. Create a Weibo instance
    2. Mweiboauth = New Weiboauth (This, Constants.app_key, Constants.redirect_url, Constants.scope);

Where the Constants.redirect_url callback address must be the same as the Sina Weibo Web application settings

Give yourself a summary: work to sink to the heart, do not impetuous improvisation timely solution

Android Sina Blog Share issues summary

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.