From fa8433308f5ba1209ec490d6c0835d28da18eacb Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Mon, 10 Aug 2009 06:05:43 +0000 Subject: Moved some stuff around. More comments and phpcs compliance. --- actions/twitterauthorization.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'actions') diff --git a/actions/twitterauthorization.php b/actions/twitterauthorization.php index cf27d69cf..c40f27164 100644 --- a/actions/twitterauthorization.php +++ b/actions/twitterauthorization.php @@ -48,7 +48,6 @@ if (!defined('LACONICA')) { */ class TwitterauthorizationAction extends Action { - /** * Initialize class members. Looks for 'oauth_token' parameter. * @@ -114,12 +113,13 @@ class TwitterauthorizationAction extends Action // Get a new request token and authorize it $client = new TwitterOAuthClient(); - $req_tok = $client->getRequestToken(); + $req_tok = + $client->getRequestToken(TwitterOAuthClient::$requestTokenURL); // Sock the request token away in the session temporarily $_SESSION['twitter_request_token'] = $req_tok->key; - $_SESSION['twitter_request_token_secret'] = $req_tok->key; + $_SESSION['twitter_request_token_secret'] = $req_tok->secret; $auth_link = $client->getAuthorizeLink($req_tok); @@ -155,12 +155,12 @@ class TwitterauthorizationAction extends Action // Exchange the request token for an access token - $atok = $client->getAccessToken(); + $atok = $client->getAccessToken(TwitterOAuthClient::$accessTokenURL); // Test the access token and get the user's Twitter info $client = new TwitterOAuthClient($atok->key, $atok->secret); - $twitter_user = $client->verify_credentials(); + $twitter_user = $client->verifyCredentials(); } catch (OAuthClientException $e) { $msg = sprintf('OAuth client cURL error - code: %1$s, msg: %2$s', -- cgit v1.2.3-54-g00ecf