Does facebook.logout() actually do anything?

I have an app that uses the Facebook api.   Login and requests working great.  But, when I try calling facebook.logout(), it never actually logs out the user.

I have the native Facebook app on my device, and even fully logged out of that and closed the app.  Then, in my app ran facebook.logout().   However, when I ran facebook.login() again, it automatically logged me in as if I were logged into the native Facebook app.  It’s as if the logout() call didn’t really do anything.

Is there a Facebook token that’s being stored that is not cleared by logout()? 

Does anyone have insight on this issue? Unless I’m missing something, as it stands now using Corona Enterprise 2013.2100, you have to uninstall and reinstall an app in order to switch Facebook accounts.

I’m facing this issue too. It still happens to the most current daily build. (2013.2112)
It seems that facebook.logout() doesn’t clear the access token properly, and I’m getting the same access token after logout and login again.

Android devices work fine here. Only iOS devices are affected.

Same issue here.  facebook.logout() doesn’t seem to work.

Anyone from Corona staff able to confirm?

I’ve asked Engineering, but be aware it’s the holidays and most of the staff have time off last week and next week.

Rob

Sounds great thanks Rob!

Hi Rob,

Please let us know if anybody was able to look at this.

Thank you.

Jorge

According to engineering:

On iOS it calls https://developers.facebook.com/docs/reference/ios/current/class/FBSession#close

On Android it calls https://developers.facebook.com/docs/reference/android/current/class/Session#closeAndClearTokenInformation

I took a look at those pages and didn’t get much from them (lot’s of native things) so YMMV but we are doing something.

Rob

Thank you for the reply, Rob!

After reading the SDK, it seems to me that the iOS call that should be used is: closeAndClearTokenInformation

This would clear the Token info which is what I think would be preferred. The close call does NOT clear the Token, so nothing really happens in iOS.

In iOS logging out of my game doesn’t stop me from using the Facebook features (because the token is still active and it re-logs in the background, never asking for id/pass, never even showing the login dialog).

The Android version of logout does call closeAndClearTokenInformation and my game works fine. I tested my logout button in Android and it did log me out (I had to re-enter my Facebook id/password to be able to use the Facebook features in my game).

Please review this and, if it makes sense, please use closeAndClearTokenInformation in iOS also.

I am about to release my game and need this feature to be working correctly to allow multiple users to play.

Thank you,

Jorge

I’ll ask.

Rob

Does anyone have insight on this issue? Unless I’m missing something, as it stands now using Corona Enterprise 2013.2100, you have to uninstall and reinstall an app in order to switch Facebook accounts.

As of 2126, the token should be getting cleared on iOS and behave just like Android.

Release notes for build 2014. through 2014.2126

  • iOS: When facebook.logout is called it will now clear the cached token.

Confirmed this works now.  Thank you!

Hi Rob, thank you so much for the quick turnaround!!!

I just tested it with the new build and it logs out correctly!

Thanks again!

Jorge

I’m facing this issue too. It still happens to the most current daily build. (2013.2112)
It seems that facebook.logout() doesn’t clear the access token properly, and I’m getting the same access token after logout and login again.

Android devices work fine here. Only iOS devices are affected.

Same issue here.  facebook.logout() doesn’t seem to work.

Anyone from Corona staff able to confirm?

I’ve asked Engineering, but be aware it’s the holidays and most of the staff have time off last week and next week.

Rob

Sounds great thanks Rob!