Skip to content

Instantly share code, notes, and snippets.

View gdelacc's full-sized avatar
🏠
Working from home

Gonzalo gdelacc

🏠
Working from home
View GitHub Profile
@gdelacc
gdelacc / github-oauth2-client.php
Created November 20, 2017 10:58
Simple PHP example of using Github's OAuth 2 API
<?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();