/** * Logout From Facebook */ public static void callFacebookLogout(Context context) { Session session = Session.getActiveSession(); if (session != null) { if (!session.isClosed()) { session.closeAndClearTokenInformation(); //clear your preferences if saved } } else { session = new Session(context); Session.setActiveSession(session); session.closeAndClearTokenInformation(); //clear your preferences if saved } }
public static void facebookLogout(Context context) { Session session = Session.getActiveSession(); if (session != null) { if (!session.isClosed()) { session.closeAndClearTokenInformation(); } } else { session = new Session(context); Session.setActiveSession(session); session.closeAndClearTokenInformation(); } }
Session session = Session.getActiveSession(); if (session != null) { if (!session.isClosed()) { session.closeAndClearTokenInformation(); //clear your preferences if saved } } else { session = new Session(context); Session.setActiveSession(session); session.closeAndClearTokenInformation(); //clear your preferences if saved }
Session session = Session.getActiveSession(); if (session != null) { if (!session.isClosed()) { session.closeAndClearTokenInformation(); //clear your preferences if saved } } else { session = new Session(context); Session.setActiveSession(session); session.closeAndClearTokenInformation(); //clear your preferences if saved }
private static void LogoutFB(Context context) { Session session = Session.getActiveSession(); if (session != null) { if (!session.isClosed()) { session.closeAndClearTokenInformation(); //clear your preferences if saved } } else { session = new Session(context); Session.setActiveSession(session); session.closeAndClearTokenInformation(); //clear your preferences if saved } }
public static void callFacebookLogout(Context context) { Session session = Session.getActiveSession(); if (session != null) { if (!session.isClosed()) { session.closeAndClearTokenInformation(); //clear your preferences if saved } }else { session = new Session(context); Session.setActiveSession(session); session.closeAndClearTokenInformation(); //clear your preferences if saved }
public static void logoutFromFB(Context context) { Session session = Session.getActiveSession(); if (session != null) { if (!session.isClosed()) { session.closeAndClearTokenInformation(); // clear your preferences if saved } } else { session = new Session(context); Session.setActiveSession(session); session.closeAndClearTokenInformation(); // clear your preferences if saved } }
public static void fbClearToken(Context context) { Session session = Session.getActiveSession(); if (session != null) { if (!session.isClosed()) { session.closeAndClearTokenInformation(); //clear your preferences if saved } } else { session = new Session(context); Session.setActiveSession(session); session.closeAndClearTokenInformation(); //clear your preferences if saved } }
public static void LogoutFB(Context context) { Session session = Session.getActiveSession(); if (session != null) { if (!session.isClosed()) { session.closeAndClearTokenInformation(); //clear your preferences if saved } } else { session = new Session(context); Session.setActiveSession(session); session.closeAndClearTokenInformation(); //clear your preferences if saved } }
public static void LogoutFB(Context context) { Session session = Session.getActiveSession(); if (session != null) { if (!session.isClosed()) { session.closeAndClearTokenInformation(); //clear your preferences if saved } } else { session = new Session(context); Session.setActiveSession(session); session.closeAndClearTokenInformation(); //clear your preferences if saved } }
public static void callFacebookLogout(Context context) { Session session = Session.getActiveSession(); if (session != null) { if (!session.isClosed()) { session.closeAndClearTokenInformation(); //clear your preferences if saved } } else { session = new Session(context); Session.setActiveSession(session); session.closeAndClearTokenInformation(); //clear your preferences if saved } }
public static void fbClearToken(Context context) { Session session = Session.getActiveSession(); if (session != null) { if (!session.isClosed()) { session.closeAndClearTokenInformation(); // clear your preferences if saved } } else { session = new Session(context); Session.setActiveSession(session); session.closeAndClearTokenInformation(); // clear your preferences if saved } }
// log out from facebook public static void callFacebookLogout(Context context) { Session session = Session.getActiveSession(); if (session != null) { if (!session.isClosed()) { session.closeAndClearTokenInformation(); // clear your preferences if saved } } else { session = new Session(context); Session.setActiveSession(session); session.closeAndClearTokenInformation(); // clear your preferences if saved } }
Session session = Session.getActiveSession(); if (session != null) { if (!session.isClosed()) { session.closeAndClearTokenInformation(); } } else { session = new Session(MainActivity.this); Session.setActiveSession(session); session.closeAndClearTokenInformation(); } preferenceHelper.onLogOut(); finish(); startActivity(new Intent(MainActivity.this, LoginActivity.class));
private Session getFBSession() { Session session = Session.getActiveSession(); if (session == null) { session = new Session(getActivity()); Session.setActiveSession(session); if (session.getState() == SessionState.CREATED_TOKEN_LOADED) session.closeAndClearTokenInformation(); } return session; }
Session activeSession = Session.getActiveSession(); //Checks for an open session if (!(activeSession == null || activeSession.getState().isClosed())) { //if found one, kill it. activeSession.closeAndClearTokenInformation(); } LoginButton authButton = (LoginButton) layout.findViewById(R.id.authButton); authButton.setReadPermissions(Arrays.asList("basic_info", "email"));
public void disConnectFacebook() { Session session = Session.getActiveSession(); if (!session.isClosed()) { session.closeAndClearTokenInformation(); } }
private void onClickLogout() { Session session = Session.getActiveSession(); if (!session.isClosed()) { session.closeAndClearTokenInformation(); } }
private void onClickLogout() { Session session = Session.getActiveSession(); if (!session.isClosed()) { session.closeAndClearTokenInformation(); } }
Session session = Session.getActiveSession(); if (session != null && session.isOpened()) { Toast.makeText(getApplicationContext(), "session is opened", Toast.LENGTH_LONG).show(); /* clear session and again click will show facebook login */ session = Session.getActiveSession(); if (!session.isClosed()) { session.closeAndClearTokenInformation(); } }