I’m surprised to discover, after some debugging, that the event returned by facebook.logout() may have the phase “login”. This happens whenever I call logout() without having previously called login(). In my app this happens if the user exits without having done anything that requires a connection to Facebook. My game has a solitaire mode, so that may be the case. I unconditionally call logout() on exit, assuming that’s an OK thing to do. But my listener thinks it’s getting a login event, which makes funny things happen.
I don’t know if this is a bug or by design, but it doesn’t make sense to me. I expected logout() to always return an event with phase “logout”.
I just had a further puzzling thought. If I haven’t called login() yet, how can logout() even call the listener? I don’t completely understand how Android manages apps and when an app is truly gone from memory. But if it doesn’t show as one of the Running Apps in Settings, doesn’t that mean the previous context is nonexistent?
Sorry, false alarm! Please forget I said anything, and I hope I haven’t wasted too many people’s time.