equal
deleted
inserted
replaced
1 <?php |
|
2 |
|
3 $config = array("rep" => basename(__DIR__)); |
|
4 |
|
5 include_once '../common.php'; |
|
6 |
|
7 if (isset($_SESSION['TWITTER_ACCESS_TOKEN']) ) { |
|
8 // Permanent redirection |
|
9 header("HTTP/1.1 301 Moved Permanently"); |
|
10 header("Location: index.php"); |
|
11 exit(); |
|
12 } else { |
|
13 /** |
|
14 * Guess we need to go get one! |
|
15 */ |
|
16 $token = $consumer->getRequestToken(); |
|
17 $_SESSION['TWITTER_REQUEST_TOKEN'] = serialize($token); |
|
18 |
|
19 /** |
|
20 * Now redirect user to Twitter site so they can log in and |
|
21 * approve our access |
|
22 */ |
|
23 $consumer->redirect(); |
|
24 } |
|
25 |
|
26 ?> |
|