From 304aadb907c5173b90f97812b4b2614b96e39c23 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 7 Sep 2012 10:23:46 +0400 Subject: remove twitter-specific code --- twitter.php | 130 ------------------------------------------------------------ 1 file changed, 130 deletions(-) delete mode 100644 twitter.php (limited to 'twitter.php') diff --git a/twitter.php b/twitter.php deleted file mode 100644 index c09d8fda4..000000000 --- a/twitter.php +++ /dev/null @@ -1,130 +0,0 @@ - CONSUMER_KEY, - 'consumer_secret' => CONSUMER_SECRET, - )); - - if ($op == 'clear') { - unset($_SESSION['oauth']); - - header("Location: twitter.php"); - return; - } - - if (isset($_REQUEST['oauth_verifier'])) { - - $op = 'callback'; - - $tmhOAuth->config['user_token'] = $_SESSION['oauth']['oauth_token']; - $tmhOAuth->config['user_secret'] = $_SESSION['oauth']['oauth_token_secret']; - - $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'])); - - unset($_SESSION['oauth']); - - db_query($link, "UPDATE ttrss_users SET twitter_oauth = '$access_token' - WHERE id = ".$_SESSION['uid']); - - } else { - header('Location: twitter.php?op=clear'); - return; - } - - } - - if ($op == 'register') { - - $code = $tmhOAuth->request('POST', - $tmhOAuth->url('oauth/request_token', ''), array( - 'oauth_callback' => $callback)); - - if ($code == 200) { - $_SESSION['oauth'] = $tmhOAuth->extract_params($tmhOAuth->response['response']); - - $method = isset($_REQUEST['signin']) ? 'authenticate' : 'authorize'; - $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}", '') . - "?oauth_token={$_SESSION['oauth']['oauth_token']}{$force}{$forcewrite}{$forceread}"; - - header("Location: $location"); - - } - } -?> - - - -Register with Twitter - - - - - - -

- - - -

- - - -

-

- -
- - -
- - - -
- - -
- -
- - -
- - - - - - -- cgit v1.2.3