Take the 2-minute tour ×

This is the link for Facebook's iOS tutorial. https://developers.facebook.com/docs/mobile/ios/build/

Can any one please explain what does this mean :

"If the device is running in a version of iOS that supports multitasking, but it doesn't have the Facebook app of version 3.2.3 or greater installed, the SDK will open the authorization dialog in Safari. After the user grants or revokes the authorization, Safari redirects back to the calling app. Similar to the Facebook app based authorization, this allows multiple apps to share the same Facebook user access_token through the Safari cookie."

Most of the posts say,like this one: Reading cookies using xcode on the iphone because of the sandbox environment of iOS one cannot access safari cookies, then how is this possible ?

and if its possible, How can multiple apps use the same access token. According to me different apps might have different permissions.

share|improve this question

1 Answer 1

Your app does not read the cookie in that case. I think it just opens up a URL in Safari. Then some Facebook code which is run in Safari checks whether a valid Facebook session exists and then calls a callback function in your app. Of course all the access tokens and with them the different permissions for all the different apps on the device are saved separately in the facebook session so that the apps do not share the permissions. Only the user is saved in the session (most likely there is only one user who uses the mobile device), so that he doesn't have to login over and over again. He instead just clicks on 'login' or 'no, I'm not So and So'.

share|improve this answer

Your Answer


