應用開發者
Discuz! 運維
- 貢獻
- 181 點
- 金幣
- 661 個

|
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']);
- }
- }
復制代碼 修改為:
也可以看
|
|