Cant get OAuth Token Secret


#1

Hi, I am fairly knew to coding and barely know any of the Twitter API. I am trying to make a mobile web application that is able to pull a users twitter information by authorizing. So far Ive gotten to the point where you go to the site, it takes you to twitter and you confirm that you allow the app to use your info. Then it redirects to my other page that verifies and if it has all the information it redirects back to the main page. This verify page has three things to verify. The OAuth Token, the OAuth Verifier, and the OAuth Token Secret. Everything comes up EXCEPT the OAuth Token Secret. So the code I am using from this (http://code.tutsplus.com/articles/how-to-authenticate-users-with-twitter-oauth--net-13595) tutorial is not working. Can anybody help? Thanks!

Twitter Login

<?php
require("twitteroauth.php");
session_start();


// The TwitterOAuth instance
$twitteroauth = new TwitterOAuth('hzA4u138Bnma3tNDlGD9f4e7L', 'LfN1xMbaoeRVCpkkUMSO2PxmPMGrFG8fPwt0PTugNrZgKEPnA2');
// Requesting authentication tokens, the parameter is the URL we will be redirected to
$request_token = $twitteroauth->getRequestToken('http://horizonmash.com/twitter_oauth.php');
 
// Saving them into the session
$_SESSION['oauth_token'] = $request_token['oauth_token'];
$_SESSION['oauth_token_secret'] = $request_token['oauth_token_secret'];
 
// If everything goes well..
if($twitteroauth->http_code==200){
    // Let's generate the URL and redirect
    $url = $twitteroauth->getAuthorizeURL($request_token['oauth_token']);
    header('Location: '. $url);
} else {
    // It's a bad idea to kill the script, but we've got to know when there's an error.
    die('Something wrong happened.');
}
?>

OAuth Verify

<?php
$oauthv = $_GET['oauth_verifier'];
$oautht = $_GET['oauth_token'];
$oauthts = $_GET['oauth_token_secret'];
if(!empty($_GET['oauth_verifier']) && !empty($_SESSION['oauth_token']) && !empty($_SESSION['oauth_token_secret'])){
    // We've got everything we need
} else {
    // Something's missing, go back to square 1
//Below echos the OAuth Token, OAuth Verifier, and the OAuth Token Secret.. But the Token Secret is always blank
    echo "somebody messed up<br>----------<br>oauthv = $oauthv<br>----------<br>oautht = $oautht<br>-----------<br>oauthts = $oauthts<br>";

}


?>