Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复 GitHub 登陆信息无法获取问题 2 #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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!');
}

}
}