Example usage for twitter4j TwitterMethod VERIFY_CREDENTIALS

List of usage examples for twitter4j TwitterMethod VERIFY_CREDENTIALS

Introduction

In this page you can find the example usage for twitter4j TwitterMethod VERIFY_CREDENTIALS.

Prototype

TwitterMethod VERIFY_CREDENTIALS

To view the source code for twitter4j TwitterMethod VERIFY_CREDENTIALS.

Click Source Link

Usage

From source file:com.marpies.ane.twitter.functions.InitFunction.java

License:Apache License

@Override
public void onException(TwitterException te, TwitterMethod method) {
    if (method == TwitterMethod.VERIFY_CREDENTIALS) {
        AIR.log("Verify credentials error: " + te.getMessage());
        /* Cached credentials are invalid, remove them from preferences */
        TwitterAPI.removeAccessTokenPreferences();
        AIR.dispatchEvent(AIRTwitterEvent.CREDENTIALS_CHECK, "{ \"result\": \"invalid\" }");
    }//from w  w  w .ja  v a 2  s  .  co  m
}