From 90b4873a00b0d8b4249a323fc84a7460024f491b Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 27 May 2008 07:42:19 -0400 Subject: client side of distributed subscription almost complete darcs-hash:20080527114219-84dde-784ddf4d4650c17bc7a1e3e01219c6948dfc9b3d.gz --- actions/accesstoken.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'actions/accesstoken.php') 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()); + } } } -- cgit v1.2.3-54-g00ecf