RxReader / tencent_kit

Flutter版QQ登录/分享
MIT License
236 stars 64 forks source link

请问setAccessToken这个方法为什么去掉了呢 #3

Closed nayibo closed 5 years ago

nayibo commented 5 years ago

如果我在登录后,想获取userinfo,openid、token、expires这些如何设置进去呢?场景是第二次打开app的时候,这样就没有登录态了

droplet-js commented 5 years ago

由于腾讯SDK(Android版)的 setAccessToken 的逻辑问题,暂时先去掉这个方法。

droplet-js commented 5 years ago

已解决,请升级 library 版本

dependencies:
  fake_tencent: ^0.2.0
              if (_loginResp != null &&
                  _loginResp.ret == TencentResp.RET_SUCCESS) {
                if (DateTime.now().millisecondsSinceEpoch -
                        _loginResp.createAt <
                    _loginResp.expiresIn * 1000) {
                  widget.tencent.getUserInfo(
                    openId: _loginResp.openid,
                    accessToken: _loginResp.accessToken,
                    expiresIn: _loginResp.expiresIn,
                    createAt: _loginResp.createAt,
                  );
                }
              }