2017 © Pedro Peláez
 

library github_login

github_login

image

fifths/github_login

github_login

  • Friday, January 15, 2016
  • by fifths
  • Repository
  • 1 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

GitHub Login

Build Status Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

GitHub 第三方登陆, (*2)

Installation(安装)

composer require fifths/github_login

authorize

require '../vendor/autoload.php';

use  GitHub\GitHub;

$gitHub=new GitHub();
$gitHub->authorize('abc');

get_user_info

require '../vendor/autoload.php';

use  GitHub\GitHub;

if(isset($_GET['code'])){
    $code=$_GET['code'];
    $gitHub=new GitHub();
    $token=$gitHub->get_access_token($code);
    $access_token=$token['access_token'];
    $getData=$gitHub->get_user_info($access_token);
    $info=json_decode($getData, true);
    print_r($info);
}

#

{
"login": "fifths",
"id": 6918354,
"avatar_url": "https://avatars.githubusercontent.com/u/6918354?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/fifths",
"html_url": "https://github.com/fifths",
"followers_url": "https://api.github.com/users/fifths/followers",
"following_url": "https://api.github.com/users/fifths/following{/other_user}",
"gists_url": "https://api.github.com/users/fifths/gists{/gist_id}",
"starred_url": "https://api.github.com/users/fifths/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fifths/subscriptions",
"organizations_url": "https://api.github.com/users/fifths/orgs",
"repos_url": "https://api.github.com/users/fifths/repos",
"events_url": "https://api.github.com/users/fifths/events{/privacy}",
"received_events_url": "https://api.github.com/users/fifths/received_events",
"type": "User",
"site_admin": false,
"name": "lee",
"company": null,
"blog": null,
"location": "Arctique",
"email": null,
"hireable": null,
"bio": null,
"public_repos": 12,
"public_gists": 0,
"followers": 4,
"following": 1,
"created_at": "2014-03-11T12:02:13Z",
"updated_at": "2016-01-14T09:06:34Z"
}

The Versions

15/01 2016

dev-master

9999999-dev

github_login

  Sources   Download

MIT

The Requires

 

by Avatar fifths

15/01 2016

1.1.2

1.1.2.0

github_login

  Sources   Download

MIT

The Requires

 

by Avatar fifths

13/01 2016

1.1.1

1.1.1.0

github_login

  Sources   Download

MIT

The Requires

 

by Avatar fifths

13/01 2016

1.1.0

1.1.0.0

github_login

  Sources   Download

MIT

The Requires

 

by Avatar fifths

11/01 2016

1.0.1

1.0.1.0

github_login

  Sources   Download

MIT

The Requires

 

by Avatar fifths

11/01 2016

1.0.0

1.0.0.0

github_login

  Sources   Download

MIT

The Requires

 

by Avatar fifths

28/12 2015

0.0.1

0.0.1.0

github_login

  Sources   Download

MIT

The Requires

 

by Avatar fifths