function oauth_access_token in OAuth 1.0 6
1 string reference to 'oauth_access_token'
- oauth_menu in ./
oauth.module - Implementation of hook_menu
File
- ./
oauth.module, line 182
Code
function oauth_access_token() {
$server = _oauth_init_server();
// Remove the q variable from the query string, as it will break
// the signature validation.
$q = $_GET['q'];
unset($_GET['q']);
try {
global $user;
$req = OAuthRequest::from_request();
$token = $server
->fetch_access_token($req);
parse_str($token);
print $token;
} catch (OAuthException $e) {
print $e
->getMessage() . "\n<hr />\n";
print_r($req);
die;
}
// Set the $_GET['q'] back to it's original value
$_GET['q'] = $q;
}