The following error is reported when you call the interface for Obtaining user information after Sina Weibo authorization (the user does not exist ):
Com. Weibo. SDK. Android. weiboexception: {"error": "user does not exists! "," Error_code ": 20003," request ":"/2/users/show. JSON "}
If you look at the Sina source code, you will find that this error is actually a very naive problem. Why do you say this? Let's take a look at the source code first:
/*** Obtain user information based on the user ID ** @ Param uid * the user ID to be queried. * @ Param listener */Public void show (Long UID, requestlistener listener) {weiboparameters Params = new weiboparameters (); Params. add ("uid", UID); Request (server_url_prix + "/Show. JSON ", Params, httpmethod_get, listener);}/*** obtain user information by user ID ** @ Param screen_name * the nickname of the user to be queried. * @ Param listener */Public void show (string screen_name, requestlistener listener) {weiboparameters Params = new weiboparameters (); Params. add ("screen_name", screen_name); Request (server_url_prix + "/Show. JSON ", Params, httpmethod_get, listener );}
After reading this, you may suddenly realize that if the input is a string, the following interface is called by default, so user does not exists will be reported!
If the input is of the long type, the above interface is called to query user information based on the UID.
PS: Do not use UID as a string to call the interface!