diff options
Diffstat (limited to 'actions/accesstoken.php')
-rw-r--r-- | actions/accesstoken.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/actions/accesstoken.php b/actions/accesstoken.php index e28a93345..6bb0e1561 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()); + } } } |