function oauth_request_token in OAuth 1.0 6
Generate a request token from the request
1 string reference to 'oauth_request_token'
- oauth_menu in ./
oauth.module - Implementation of hook_menu
File
- ./
oauth.module, line 137
Code
function oauth_request_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 {
$req = OAuthRequest::from_request();
$token = $server
->fetch_request_token($req);
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;
}