用oauth.signpost框架做认证时CommonsHttpOAuthProvider方法应该是运行了,但是界面不跳转,部分代码如下。。新手求指导
入梦似凡 2014-10-15 11:27:57 public Boolean requestAccessToken(Activity activity, String callBackUrl) {
Boolean flag = false;
try {
httpOauthConsumer = new CommonsHttpOAuthConsumer(APP_KEY,
APP_SECRET);
httpOauthprovider = new CommonsHttpOAuthProvider(
"http://api.t.sina.com.cn/oauth/request_token",
"http://api.t.sina.com.cn/oauth/access_token",
"http://api.t.sina.com.cn/oauth/authorize");
Log.e(TAG, "----user2-----");
String authUrl = httpOauthprovider.retrieveRequestToken(
httpOauthConsumer, callBackUrl);
Log.e(TAG, "----user3-----");
activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri
.parse(authUrl)));
Log.e(TAG, "----user4-----");
flag = true;
} catch (Exception e) {
e.printStackTrace();
}
return flag;
}
有----user2----的输出,没有----user3----的输出