Web application login steps (http://open.weibo.com/wiki/Oauth2 ):
1. register an application at http://open.weibo.com/and edit the application information --> "oauth2.0 authorization Settings" for "advanced information" and set the authorization callback page;
2. Modify the value of the yellow area and load it with webview;
"Https://api.weibo.com/oauth2/authorize? Client_id =Your_client_id& Response_type = Code & redirect_uri =Your_registered_redirect_uri"
3. In the onpagestarted method of webviewclient, the webpage jumps to get the code content;
4. modify the content of the yellow area to obtain the value of access_token;
Https://api.weibo.com/oauth2/access_token? Client_id =Your_client_id& Client_secret =Your_client_secret& Amp; grant_type = authorization_code & redirect_uri =Your_registered_redirect_uri& Code =Code
The effect is as follows:
Source codeDownload: sinaweibo.rar