summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-08-10 06:05:43 +0000
committerZach Copley <zach@controlyourself.ca>2009-08-10 06:05:43 +0000
commitfa8433308f5ba1209ec490d6c0835d28da18eacb (patch)
tree2fffc19f8cbd9a4b678228cc8e2751773b4c77fa /actions
parentdf12206421ca74b5c352bb663ca43e9aabe667fd (diff)
Moved some stuff around. More comments and phpcs compliance.
Diffstat (limited to 'actions')
-rw-r--r--actions/twitterauthorization.php10
1 files changed, 5 insertions, 5 deletions
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',