public boolean isAuthenticated() { Twitter twitter = getAndConfigureApiInstance(); if (twitter == null) { return false; } try { twitter.getAccountSettings(); return true; } catch (TwitterException e) { return false; } }