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); } }
相关文章推荐
- 进程间通信(IPC)之共享内存
- linux升级python,安装pip等。
- 如何快速查看linux的发行版信息
- Hibernate4.3+Spring4.2 整合问题
- UVA 1225
- 老男孩IT教育在线3期新学员司毅第一期作业
- 修改UITextField的placeholder颜色
- linux系统的crond服务
- Perfect Squares
- XML转Lua表
- 我活了
- 10 个实用的jQuery 代码片段
- JavaEE学习笔记之SSH—Struts2(1)
- 《创世纪语录》1、只要有梦想,什么都能够实现。3、做得越多机会越多。
- 《创世纪语录》1、只要有梦想,什么都能够实现。3、做得越多机会越多。
- 学习LINUX运维决心书
- 谷歌浏览器快捷键
- 12个用得着的JQuery代码片段
- 最长公共子序列 LCS
- FreeCodeCamp练习笔记