"Invalid or expired token" ["code"]=> int(89)


#1

hi,

my token is invalid but why?

I use this piece of script to acquire a token:

    <?php
    require('twitter/twitteroauth.php'); 
    require 'config/twconfig.php';
    $twitteroauth = new TwitterOAuth(YOUR_CONSUMER_KEY, YOUR_CONSUMER_SECRET); 
    // Requesting authentication tokens, the parameter is the URL we will be redirected to 
    $request_token = $twitteroauth->getRequestToken($website['url'].'/getTwitterData.php'); 
    
    // Saving them into the session 
    $_SESSION['oauth_token'] = $request_token['oauth_token']; 
    $_SESSION['oauth_token_secret'] = $request_token['oauth_token_secret'];
    ?>

object returned after error:
object(stdClass)#8 (1) {
  ["errors"]=>
  array(1) {
    [0]=>
    object(stdClass)#6 (2) {
      ["message"]=>
      string(24) "Invalid or expired token"
      ["code"]=>
      int(89)
    }
  }
}

#2

i also have the same problem .