Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Gonzalo gdelacc

🏠
Working from home
View GitHub Profile
@gdelacc
gdelacc / github-oauth2-client.php
Created Nov 20, 2017 — forked from aaronpk/github-oauth2-client.php
Simple PHP example of using Github's OAuth 2 API
View github-oauth2-client.php
<?php
define('OAUTH2_CLIENT_ID', '');
define('OAUTH2_CLIENT_SECRET', '');
$authorizeURL = 'https://github.com/login/oauth/authorize';
$tokenURL = 'https://github.com/login/oauth/access_token';
$apiURLBase = 'https://api.github.com/';
session_start();