I am facing some weird issues with access tokens.
When a user logs in, the IOS app send the token and secret. I make a call to verify_credentials and store the user’s details. Then based on user actions I send tweets time to time.
We started getting ‘invalid or expired token’ error when sending tweets for some users. So we decided to logout the user when that happens. When the user logins again we would have a valid token. The problem now is verify_credentials works fine during login and all the api calls after that give ‘invalid or expired token’ error.
When debugging this issue using my account’s access tokens, the server could send tweets. When I tried to do update_status using the same access tokens locally with tweepy I got ‘invalid or expired token issue’. Thought It was tweepy issue. So tried the same with twython. Got the same error. Guessed the token has actually expired. But again tried from server and it could send the tweets. Looks very strange.
Anyone faced this issue? Twitter people, any advice on this?