On Android I call facebook:authorize() on the main and, only if it's my first attempt, it ask me for the permissions.
Instead on iOS EVERY time I call facebook:authorize() it open facebook on safari (I don't have the facebook app installed) and it tells me that I have already authorized the app.
Comments
facebook:isSessionValid() or facebook:getAccessToken()
to check whether it was authorized or not. (i prefer using sessionValid)
P.S: It might have some probelm, if you do something like removing your app permission on facebook, you would fail the log-in because app consider your session valid but don't have permission.
If that happen, simply remove checking session, log in, and then put it again[dev purpose only]. For end user, i don't think they would log in back after removing app permission, or rather, i don't think they would remove the app permission. But i think, sessionValid would be reset after some time. So it's still fine.
Also on Android, be sure to check log in without using the Developer Account for facebook. Sometime it would fail (since it require hash key that being put on server)
As soon as possibile i will try isSessionValid as suggested by @tkhnoman
https://play.google.com/store/apps/developer?id=Arcadia Solutions
Dislikes: nelinho
https://play.google.com/store/apps/developer?id=Arcadia Solutions
Yep, it also being asked each time for me too (for iOS).
You don't need to authorize each time. But i think don't do that on game start, use checking when user really want to access facebook feature.
if facebook:isSessionValid() then
--- post or grab, might be good to also do extend token access
else
facebook:authorize() --- also remember, there is string arg for authorize
end
Also @atilim , i prefer that there is iOS version checking, so for the newer one, we just need to use that popup(less intrusive).
https://play.google.com/store/apps/developer?id=Arcadia Solutions
I have a ios gideros player with facebook plugin and all works fine. Now don't ask me auth and I can use facebook correctly....
With the exported project i have this strange problem...when i start the game it ALWAYS ask me the auth and tell me that I have already authorized the app... i press OK and i come back to the gideros player (????) and not to the exported project...
If I unistall gideros player and launch the game it come back correctly to my game but ask me again the authorization in a loop.....
https://play.google.com/store/apps/developer?id=Arcadia Solutions
Possibly, you forget to turn off the url scheme for GiderosPlayer (the one with fbxxxxxxxxx)
Just turn it off, and put it at your exported project.
About the authorize loop, i still don't know why, possibly there is something wrong set on the developer.facebook.com
(when it came back to your app, did it open from the start or being resumed?)
Anyway, you can check whether the app receive token with this: http://giderosmobile.com/forum/discussion/comment/30893#Comment_30893
And then print sessionValid (or use alert dialog instead print).
"Possibly, you forget to turn off the url scheme for GiderosPlayer"
You saved my days!
https://play.google.com/store/apps/developer?id=Arcadia Solutions