X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Frequesttoken.php;h=4a23215323fd767a28f412e106e575807470e637;hb=adeb19f1f7a82b17cee85ade1ac06fcd48e0d4cb;hp=731d260ffd2b36ca5d7314373f409bb931eecd1b;hpb=2fe978e1bb044a2ba8920156184dee7bb57c728b;p=quix0rs-gnu-social.git diff --git a/actions/requesttoken.php b/actions/requesttoken.php index 731d260ffd..4a23215323 100644 --- a/actions/requesttoken.php +++ b/actions/requesttoken.php @@ -19,9 +19,23 @@ if (!defined('LACONICA')) { exit(1); } +require_once(INSTALLDIR.'/lib/omb.php'); + class RequesttokenAction extends Action { + + function is_readonly() { + return false; + } + function handle($args) { parent::handle($args); - common_server_error(_t('Not yet implemented.')); + try { + $req = OAuthRequest::from_request(); + $server = omb_oauth_server(); + $token = $server->fetch_request_token($req); + print $token; + } catch (OAuthException $e) { + common_server_error($e->getMessage()); + } } }