简体   繁体   中英

iOS facebook login ask for permission every time

I'm using FBLoginView in my iOS app. I do everything like in this tutorial. Everything works great except one thing. When I logout and then login again via facebook it opens view with ask for grant permission to app with information I grant permission already. How can I skip this view after grant permission first time?

There are two ways to log out :

Closes the local in-memory session object, but does not clear the persisted token cache.

[[FBSession activeSession] close];

and

Closes the in-memory session, and clears any persisted cache related to the session.

[[FBSession activeSession] closeAndClearTokenInformation];

In your case, I think that using the first option rather than the second will keep your token, and you won't need to ask permission again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM