Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- require_once("../requests/library/Requests.php");
- Requests::register_autoloader();
- $code = $_GET['code'];
- $client_id = "hax";
- $client_secret = "moar_hax";
- echo "I got a code! <pre>".$code."</pre>";
- echo "Now I will try to do something with it:";
- $options = array('auth' => array($client_id, $client_secret));
- //"Basic ".base64_encode($client_id.":".$client_secret));
- $token_request = Requests::post("https://oauth.reddit.com/api/v1/access_token","grant_type=authorization_
- code&code=".$code."&redirect_uri=https%3A%2F%2Fwww.thefinn93.com%2Freddit%2Fcb&cleint_id=".$client_id, ar
- ray(), $options);
- echo "<hr>";
- echo "<pre>";
- print_r($token_request);
- ?>
Add Comment
Please, Sign In to add comment