diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/ActFmLoginActivity.java b/astrid/plugin-src/com/todoroo/astrid/actfm/ActFmLoginActivity.java index 300c5de68..3ecca1d9a 100644 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/ActFmLoginActivity.java +++ b/astrid/plugin-src/com/todoroo/astrid/actfm/ActFmLoginActivity.java @@ -524,8 +524,10 @@ public class ActFmLoginActivity extends SherlockFragmentActivity { // --- facebook handler + @SuppressWarnings("nls") private void onSessionStateChange(Session session, SessionState state, Exception exception) { if (state.isOpened()) { + Log.e("fb-login", "State opened"); facebookSuccess(session); } else if (state.isClosed()) { Log.e("fb-login", "State closed"); diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncV2Provider.java b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncV2Provider.java index ca3843fbb..018fdd488 100644 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncV2Provider.java +++ b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncV2Provider.java @@ -12,6 +12,7 @@ import org.json.JSONObject; import android.app.Activity; import android.content.DialogInterface; +import com.facebook.Session; import com.timsu.astrid.GCMIntentService; import com.timsu.astrid.R; import com.todoroo.andlib.service.Autowired; @@ -60,6 +61,10 @@ public class ActFmSyncV2Provider extends SyncV2Provider { actFmPreferenceService.clearLastSyncDate(); ActFmPreferenceService.premiumLogout(); GCMIntentService.unregister(ContextManager.getContext()); + Session activeSession = Session.getActiveSession(); + if (activeSession != null) { + activeSession.closeAndClearTokenInformation(); + } DialogUtilities.okCancelCustomDialog(activity, activity.getString(R.string.actfm_logout_clear_tasks_title),