您的位置:首页 > 其它

QQ第三方登陆后不走回调

2016-07-12 02:33 357 查看
private void onQQLoginClick() {
// 这里的逻辑和官方文档一样
tencent = Tencent.createInstance(Config.QQ_APP_ID, this);
if (!tencent.isSessionValid()) {
tencentLoginListener = new IUiListener() {
@Override
public void onComplete(Object o) {
org.json.JSONObject obj = (org.json.JSONObject) o;
Log.i(TAG, "#onComplete " + obj);
}

@Override
public void onError(UiError uiError) {
Log.i(TAG, "#onError " + uiError.errorMessage);
}

@Override
public void onCancel() {
Log.i(TAG, "#onCancel 取消");
}
};
tencent.login(this, "all", tencentLoginListener);
}
}

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
//注意回调------↓↓↓
if(requestCode ==  Const↓ants.RESULT_LOGIN) {
Tencent.onActivityResultData(requestCode, resultCode, data, tencentLoginListener);
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: