Classification:Android (+)
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Directory (?) [-]
- I encounter bug 1 SSO package or SINGN error
- BUG2 SSO Login Authorization code does not go into class Authlistener OnComplete method
- BUG3 No permissions added
- 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
- /**
- * This function is called when the SSO authorization Activity exits.
- *
- * @see {@link Activity#onactivityresult}
- */
- @Override
- protected void Onactivityresult (int requestcode, int resultcode, Intent data) {
- Super.onactivityresult (Requestcode, ResultCode, data);
- //SSO Authorization callback
- //IMPORTANT: Activity that initiates SSO login must rewrite Onactivityresult
- if (mssohandler! = null) {
- Mssohandler.authorizecallback (Requestcode, ResultCode, data);
- }
- }
BUG (3): No permissions added[Java]View PlainCopy
- <uses-permission android:name="Android.permission.INTERNET"/>
- <uses-permission android:name="Android.permission.ACCESS_WIFI_STATE"/>
- <uses-permission android:name="Android.permission.ACCESS_NETWORK_STATE"/>
- <uses-permission android:name="Android.permission.WRITE_EXTERNAL_STORAGE"/>
BUG (4): Callback address is different[Java]View PlainCopy
- Create a Weibo instance
- 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