Invalid access token format exception from twitter4j-core-2.2.5.jar
<p>I am an android developer and I want to share tweets and images to twitter. </p>

<p>I am using Twitter jar file <strong>twitter4j-core-2.2.5.jar</strong>.</p>

<p>I am getting an error :<code>Android-runtime(694): Caused by: java.lang.IllegalArgumentException: Invalid access token format</code> when I use this method.</p>

<p>But when I use <strong>twitter4j-core-2.1.11</strong> jar This method worked correctly. Please help me.</p>

<pre><code>public static boolean isAuthenticated(SharedPreferences prefs) {

        String token = prefs.getString(OAuth.OAUTH_TOKEN, "");
        String secret = prefs.getString(OAuth.OAUTH_TOKEN_SECRET, "");

        AccessToken accesstoken = new AccessToken(token, secret);
        Twitter twitter = new TwitterFactory().getInstance();

        twitter.setOAuthConsumer(Constants.CONSUMER_KEY,
                Constants.CONSUMER_SECRET);
        twitter.setOAuthAccessToken(accesstoken);

        try {
            twitter.getAccountSettings();
            return true;
        } catch (TwitterException e) {
            return false;
        }
    }
</code></pre>
