Twitter OAuth: There is no request token for this page
The two scenarios that seem most likely to me are:
1) There is an error while getting the request token. Try adding some error handling.
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET);$request_token = $connection->oauth('oauth/request_token', array('oauth_callback' => OAUTH_CALLBACK));if ($connection->getLastHttpCode() == 200) { $_SESSION['oauth_token'] = $request_token['oauth_token']; $_SESSION['oauth_token_secret'] = $request_token['oauth_token_secret']; $url = $connection->url('oauth/authorize', array('oauth_token' => $request_token['oauth_token'])); header('Location: '.$url);} else { var_dump($request_token); exit('Error getting request_token');}
2) Twitter has a bug where it's not recognizing the the request_token for some reason.
The next step in debugging is to find out the status of $request_token that results in the error.