Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / FaceBookLogout() problem...

Author
Message
Space Dream Studios
Competition Prize Winner 2014
14
Years of Service
User Offline
Joined: 3rd Mar 2010
Location:
Posted: 15th May 2014 14:34
There is an older thread here in the forum but with no solution.
When I'm logged in with my app to FB, it's not possible to logout as far as I experience it with AppGameKit Tier1 108.21 here, using the FaceBookLogout() function. Is there anything else I should do beside calling the logout function? Or is it a bug?
Thanks in advance!

Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 15th May 2014 19:02
I've used it, but only for testing. It works as intended. That means that it sort of kills the FB session data in Android. I'm not sure if it does the same in iOS. I believe the functionality there is contained in a precompiled file.

What are you expecting it to do?
Once you login with FB with an app it should create a basic permission dialogue. After that permission is granted the user will not see that dialogue again when FB login is called. If you're testing and you want to see the dialogue again then you need to go to Facebook and go to your settings then apps and revoke/delete permission.

Also, if you're using FacebookPostToWall on Android you might want to check out my fix
naplandgames.com/agk
Right now on AppGameKit Android apps, Facebook will ask you to enter a username and password when you attempt to post to wall no matter if you are logged in or not. This is because AppGameKit does not ask for permission to post to wall. This permission needs to be asked for separately from the login. The guide on my site explains how to modify AGKHelper.java to do this. It's about 5 lines of cut and paste code. Very easy fix for an ugly problem. Paul is going to wrap it into the next AGK.

Let us know how you make out and let us know the specifics (what platform you're having issues on, what you expect to happen) and I'll see what I can do to help!

Space Dream Studios
Competition Prize Winner 2014
14
Years of Service
User Offline
Joined: 3rd Mar 2010
Location:
Posted: 16th May 2014 16:28
Thanks Naphier!

I have the problem on ANDROID. I tried the settings you suggested too, but no success.

Actually I don't want that the app stays logged in into facebook all the time, but it does. Even if I call the facebooklogout() function within the app.

I want to have the login dialogue, every time I need a new login.
Otherwise an other new player on the same device, will see the friends list of the player before, for example.... and can't change it to his facebook acount...

Hope you understand my problem.

Thanks in advance for taking care!

Space Dream Studios
Competition Prize Winner 2014
14
Years of Service
User Offline
Joined: 3rd Mar 2010
Location:
Posted: 16th May 2014 18:46 Edited at: 16th May 2014 18:47
OK, got it solved! It's not an AppGameKit problem!!!
After intensive research and testing, I found in the device SETTINGS / ACCOUNTS a section with FACEBOOK ACOUNT data. After deleting that account, the logout works So it looks like saving FB account data on the android device, overwrites the logout function...

Naphier
13
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 16th May 2014 20:39
Mobile devices aren't well suited for multiple users. At one point I had thought I heard Android was going to support multi-user setups more like Windows, but I've not seen that. It certainly can hold as many accounts as you want.
If you've installed Facebook app on the device it will create that account in account settings. With the Facebook app installed the Facebook SDK for android will always look for that info instead of asking the user to log in with a email and password. This is the desired result. Multi-user support will be confusing to most users, especially for Facebook since the single users will expect a certain behavior.
I wonder what happens if there is more than one Facebook account on the device. The user might be presented with an option at FB login to select which account, but I can't imagine many people have it set up like that because it would have the FB credentials stored for each user and for most people they don't want to share.

So the FB account data doesn't "overwrite" the logout function. The logout function does what it is supposed to and clears the AppGameKit app's FB session info. But when you call login it just logs right back in to the first FB account found on the device. This is how FB SDK is designed. I'm not sure if you can do it differently without extensive changes to the java code. In any case I'm at a loss as how to do it and I, personally, wouldn't be able to spend time helping out on this as it is not a feature I'd have a desire for.

Hope this makes sense.

Login to post a reply

Server time is: 2024-04-27 22:15:50
Your offset time is: 2024-04-27 22:15:50