Skip to content

Instantly share code, notes, and snippets.

@kwylez
Created September 24, 2010 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kwylez/595372 to your computer and use it in GitHub Desktop.
Save kwylez/595372 to your computer and use it in GitHub Desktop.
<?php
$token = '';
if ($_GET['code'] !== '') {
$token = file_get_contents('https://graph.facebook.com/oauth/access_token?client_id=xxxxxxxxxxxxxxxx&redirect_uri=http://youdomain.com/callbackurl/&client_secret=xxxxxxxxxxxxxx&code='.$_GET['code']);
} else {
print "no code";
}
?>
<html>
<title>OAuth Test</title>
<body>
<div id="token"><?=$token?></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment