Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions ThinkSDK/sdk/GithubSDK.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

直接GET


$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);
}

Expand Down Expand Up @@ -75,4 +74,4 @@ public function openid(){
throw new Exception('没有获取到 Github 用户ID!');
}

}
}