Skip to content

Instantly share code, notes, and snippets.

View javiergarzac's full-sized avatar
🌵

Javier Garza javiergarzac

🌵
View GitHub Profile
@javiergarzac
javiergarzac / github-oauth3-client.php
Last active June 10, 2018 18:33
Simple PHP example of using Github's OAuth 3 API
<?php
define('OAUTH2_CLIENT_ID', '');
define('OAUTH2_CLIENT_SECRET', '');
define('API_NAME', '');
$authorizeURL = 'https://github.com/login/oauth/authorize';
$tokenURL = 'https://github.com/login/oauth/access_token';
$apiURLBase = 'https://api.github.com/';
session_start();