X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=actions%2Faccesstoken.php;h=6bb0e1561b3d3bfd3aee8159facd50f072a3794c;hb=9cac74ddca9734a392f43d52c27d30cd1a3638ed;hp=e28a9334542f83e214191c2c36a6840d4ec32c6d;hpb=2fe978e1bb044a2ba8920156184dee7bb57c728b;p=quix0rs-gnu-social.git diff --git a/actions/accesstoken.php b/actions/accesstoken.php index e28a933454..6bb0e1561b 100644 --- a/actions/accesstoken.php +++ b/actions/accesstoken.php @@ -22,6 +22,13 @@ if (!defined('LACONICA')) { exit(1); } class AccesstokenAction extends Action { function handle($args) { parent::handle($args); - common_server_error(_t('Not yet implemented.')); + try { + $req = OAuthRequest::from_request(); + $server = common_oauth_server(); + $token = $server->fetch_access_token($req); + print $token; + } catch (OAuthException $e) { + common_server_error($e->getMessage()); + } } }