equal
deleted
inserted
replaced
2 |
2 |
3 /** |
3 /** |
4 * include some common code (like we did in the 90s) |
4 * include some common code (like we did in the 90s) |
5 * People still do this? ;) |
5 * People still do this? ;) |
6 */ |
6 */ |
7 include_once './common.php'; |
7 include_once 'common.php'; |
|
8 if(!isset($_REQUEST['rep'])) { |
|
9 $rep = $C_default_rep; |
|
10 } |
|
11 else { |
|
12 $rep = $_REQUEST['rep']; |
|
13 } |
|
14 |
8 |
15 |
9 /** |
16 /** |
10 * Someone's knocking at the door using the Callback URL - if they have |
17 * Someone's knocking at the door using the Callback URL - if they have |
11 * some GET data, it might mean that someone's just approved OAuth access |
18 * some GET data, it might mean that someone's just approved OAuth access |
12 * to their account, so we better exchange our current Request Token |
19 * to their account, so we better exchange our current Request Token |
23 $_SESSION['TWITTER_REQUEST_TOKEN'] = null; |
30 $_SESSION['TWITTER_REQUEST_TOKEN'] = null; |
24 |
31 |
25 /** |
32 /** |
26 * With Access Token in hand, let's try accessing the client again |
33 * With Access Token in hand, let's try accessing the client again |
27 */ |
34 */ |
28 header('Location: ' . URL_ROOT . 'client.php' ); |
35 header('Location: ' . URL_ROOT . "$rep/client.php" ); |
29 } else { |
36 } else { |
30 /** |
37 /** |
31 * Mistaken request? Some malfeasant trying something? |
38 * Mistaken request? Some malfeasant trying something? |
32 */ |
39 */ |
33 exit('Invalid callback request. Oops. Sorry.'); |
40 exit('Invalid callback request. Oops. Sorry.'); |