Exemplo n.º 1
0
  public void LogoutTwitter() {

    SharedPreferences pref = context.getSharedPreferences(Const.PREF_NAME, Context.MODE_PRIVATE);
    SharedPreferences.Editor editor = pref.edit();
    editor.remove(Const.PREF_KEY_ACCESS_TOKEN);
    editor.remove(Const.PREF_KEY_ACCESS_TOKEN_SECRET);
    editor.commit();

    if (mTwitter != null) {
      mTwitter.shutdown();
    }

    Toast.makeText(activity, "Successfully logged out", Toast.LENGTH_SHORT).show();
  }