From 107d0cf39e3801547a9a86b32762b772b25f6953 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 11 Dec 2011 23:59:25 +0400 Subject: overall directory tree cleanup --- twitter.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'twitter.php') diff --git a/twitter.php b/twitter.php index 9d0c8e509..2c325140b 100644 --- a/twitter.php +++ b/twitter.php @@ -1,4 +1,6 @@ CONSUMER_KEY, 'consumer_secret' => CONSUMER_SECRET, - )); + )); if ($op == 'clear') { unset($_SESSION['oauth']); @@ -43,7 +45,7 @@ $code = $tmhOAuth->request('POST', $tmhOAuth->url('oauth/access_token', ''), array( 'oauth_verifier' => $_REQUEST['oauth_verifier'])); - + if ($code == 200) { $access_token = json_encode($tmhOAuth->extract_params($tmhOAuth->response['response'])); @@ -62,7 +64,7 @@ if ($op == 'register') { - $code = $tmhOAuth->request('POST', + $code = $tmhOAuth->request('POST', $tmhOAuth->url('oauth/request_token', ''), array( 'oauth_callback' => $callback)); @@ -73,8 +75,8 @@ $force = isset($_REQUEST['force']) ? '&force_login=1' : ''; $forcewrite = isset($_REQUEST['force_write']) ? '&oauth_access_type=write' : ''; $forceread = isset($_REQUEST['force_read']) ? '&oauth_access_type=read' : ''; - - $location = $tmhOAuth->url("oauth/{$method}", '') . + + $location = $tmhOAuth->url("oauth/{$method}", '') . "?oauth_token={$_SESSION['oauth']['oauth_token']}{$force}{$forcewrite}{$forceread}"; header("Location: $location"); -- cgit v1.2.3