应用开发者
Discuz! 运维
- 贡献
- 186 点
- 金币
- 667 个

|
QQ互联目前获取到的都是qquser,无法获取到正常的QQ昵称
解决方法:
1.打开source/plugin/qqconnect/lib/ConnectOAuth.php
2.搜索代码,大约在409行
- public function connectGetUserInfo_V2($openId, $accessToken) {
- $params = array(
- 'access_token' => $accessToken,
- 'oauth_consumer_key' => $this->_appKey,
- 'openid' => $openId,
- 'format' => 'xml'
- );
- require_once DISCUZ_ROOT.'/source/plugin/qqconnect/lib/Util.php';
- $utilService = new Cloud_Service_Util();
- $response = $this->dfsockopen($this->_getUserInfoURL_V2.'?'.$utilService->httpBuildQuery($params, '', '&'));
- $data = $this->_xmlParse($response);
- if(isset($data['ret']) && $data['ret'] == 0) {
- return $data;
- } else {
- throw new Exception($data['msg'], $data['ret']);
- }
- }
复制代码 修改为:
也可以看
|
|