From 4a68ed2fabc7b91595a61c754156c55cec61bb08 Mon Sep 17 00:00:00 2001 From: AirLind <1149527164@qq.com> Date: Sat, 19 Mar 2016 22:04:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DGITHUB=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E8=8E=B7=E5=8F=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复GITHUB错误提示“没有获取到 Github 用户ID!” --- ThinkSDK/sdk/GithubSDK.class.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ThinkSDK/sdk/GithubSDK.class.php b/ThinkSDK/sdk/GithubSDK.class.php index 85fb9e5..06afca1 100644 --- a/ThinkSDK/sdk/GithubSDK.class.php +++ b/ThinkSDK/sdk/GithubSDK.class.php @@ -39,10 +39,9 @@ class GithubSDK extends ThinkOauth{ */ public function call($api, $param = '', $method = 'GET', $multi = false){ /* Github 调用公共参数 */ - $params = array(); - $header = array("Authorization: bearer {$this->Token['access_token']}"); + $params = array('access_token' => $this->Token['access_token']); - $data = $this->http($this->url($api), $this->param($params, $param), $method, $header); + $data = $this->http($this->url($api), $this->param($params, $param), $method); return json_decode($data, true); } @@ -75,4 +74,4 @@ public function openid(){ throw new Exception('没有获取到 Github 用户ID!'); } -} \ No newline at end of file +}