开发Android App,使用新浪微博的OAuth 2.0 API进行登陆,如何获得授权access_token
呢?还是只能通过用户名/密码
进行登陆?
我知道网页应用可以请求https://api.weibo.com/oauth2/authorize
;然后跳转到redirect_uri
页面来获取code
和state
;然后再请求https://api.weibo.com/oauth2/access_token
获取access_token
。但在Android App中如何设置redierct_uri
?
另外:如果自己实现一个OAuth 2.0 Server服务,让第三方知道用户名和密码是否有安全隐患?
对于Mobile客户端应用来说,是不存在Server的,redirect_uri只要与新浪微博开放平台->我的应用->应用信息->高级应用->授权设置->应用回调页中的url地址保持一致就可以了。