Hi Rob,
Please let us know if anybody was able to look at this.
Thank you.
Jorge
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
As of 2126, the token should be getting cleared on iOS and behave just like Android.
Release notes for build 2014. through 2014.2126
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
Hi everyone, dose it require corona pro feature or more to have facebook.logout() work properly? seem I got problem with this also.
Thay
Hi,
I use the paid version of Corona (NOT Enterprise) and the Facebook issue was fixed a while back.
What you have to keep in mind is that the logout process has 2 steps.
You need to logout from your Corona app, and then logout from Facebook in your mobile (from the Facebook app, or the website).
If you don’t logout from Facebook, your app may re-login automatically.
Jorge
@uysuntray, facebook.logout() had a behavior change to make it more like android in a daily build after the last public build. So you would need to be Pro or Enterprise to get it. But we are working on the next public release that should be out soon.
Rob
Hi everyone, dose it require corona pro feature or more to have facebook.logout() work properly? seem I got problem with this also.
Thay
Hi,
I use the paid version of Corona (NOT Enterprise) and the Facebook issue was fixed a while back.
What you have to keep in mind is that the logout process has 2 steps.
You need to logout from your Corona app, and then logout from Facebook in your mobile (from the Facebook app, or the website).
If you don’t logout from Facebook, your app may re-login automatically.
Jorge
@uysuntray, facebook.logout() had a behavior change to make it more like android in a daily build after the last public build. So you would need to be Pro or Enterprise to get it. But we are working on the next public release that should be out soon.
Rob
Hi Rob, the logout functionality seems to be broken again. Same problem as before.
Facebook has recently changed their API I wonder if this is causing the problem.
I noticed that build CoronaSDK 2014.2319 mentions that a logout issue has been fixed, but it hasn’t fixed the issue in my case.
I have only tested this in iOS, not sure if Android is also affected.
Can you be a little more specific about the problem? I need something more than “Its broken” to take to engineering, especially if they just fixed it.
Rob
Sure, Rob!
In my app, I have a button to login to Facebook and another button to Logout.
Before, I was able to switch users in my app by doing this:
1- I would login to Facebook via a the Facebook app (or by going to Facebook.com if I don’t have the app installed)
2- I would launch my game and click on the “Log in to Facebook” button.
3- My app would grab my current Facebook user and I would be able to see my avatar, list of friends, etc within my app.
4- I would then click my Logout button, which uses facebook.logout()
5- I would go to the Facebook app (or Facebook.com) and I would switch to different user.
6- Then I would return to my app and click on the “Log in to Facebook” button again.
7- My app would then grab the NEW user from Facebook and show me this user’s avatar and list of friends.
What is happening now, is that no matter what I do, my app will not grab the new user info, it will keep on login me in with the user I first signed up with. Basically, it is not erasing the Facebook token/cache.
This is exactly the same issue that I reported in January 7th.
It may be that the Corona team is again not using closeAndClearTokenInformation or it may be that the changes on the Facebook API have changed how logout works.
Jorge
I can confirm the same issue Jorge is having. The login persists after calling logout.
This could be a change from Facebook. They now try to use the iOS builtin login information when possible (I think). Let me ask engineering.