Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expired token #3

Closed
noxidsoft opened this issue Mar 4, 2013 · 6 comments
Closed

Expired token #3

noxidsoft opened this issue Mar 4, 2013 · 6 comments

Comments

@noxidsoft
Copy link

Getting an expired token notice from the return, does your code regenerate the signature each time, any ideas?:

Array ( [errors] => Array ( [0] => stdClass Object ( [message] => Invalid or expired token [code] => 89 ) ) [httpstatus] => 401 )

@ZweiSteinSoft
Copy link
Contributor

This error occurs when the token you're using is either expired or invalid. Verify that the strings you're using for access token and access token secret are valid. You may have inadvertently expired the tokens and need to regenerate them.

Can you post the exact error message you're getting? A full HTTP log of the entire request, or as much data as you can provide, would be helpful. Thanks.

@kojilab
Copy link

kojilab commented Mar 6, 2013

Getting the same after following the exact same example as the git page.

@kojilab
Copy link

kojilab commented Mar 6, 2013

Using the example on the git page, I added another line to my code when I reassign the oauth_token and oauth_token_secret in the post authorization callback based on the response. Then it's all good

$cb->setToken($_SESSION['twitter_data']->oauth_token, $_SESSION['twitter_data']->oauth_token_secret);
$response = $cb->oauth_accessToken(array(
'oauth_verifier' => $_GET['oauth_verifier']
));
$_SESSION['twitter_data'] = $response;
$cb->setToken($_SESSION['twitter_data']->oauth_token, $_SESSION['twitter_data']->oauth_token_secret);

@wordgame
Copy link

Me too. Will let you guys know if I work it out.

@noxidsoft
Copy link
Author

Yeah, that works well now. Thanks. Consider solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants