So I was running my code which involves getting past tweets from a list of twitter users (i'm using application based authentication). I have been running it for around 2 days and now, it throws me an exception,
401:Authentication credentials (https://dev.twitter.com/pages/auth) were missing or incorrect. Ensure that you have set valid consumer key/secret, access token/secret, and the system clock is in sync.
I then found that the access token and access token secret for my application at https://apps.twitter.com/ has been changed. OAuth FAQ guide says "We do not currently expire access tokens" so I'm not sure what is really happening.
Below is the code snippet which does this (I'm using twitter4j library):
private static void getTweetsOfTheseUsers( List<String> usernames )
Twitter twit = TwitterAuth.getInstance();
for ( String user : usernames )
//get tweets for each user using twit.getUserTimeline();
}//end of method
I terminated the app and started again and it's working fine again with the same a/t and a/t/s. Can't really think what happned?