Search code examples
iosfacebookfacebook-graph-apifacebook-ios-sdk

iPhone app, how to avoid asking the user to re login to facebook


I am integrating my app with FaceBook on iPhone. When the first time user log's in I would like to ask him to enter the FaceBook credentials, but after than whenever he come back to my app I don't him to show the login screen again. So I have two questions

  1. How does this single sign on works? - it says that if the user is already logged into FaceBook through some other app, FaceBook login screen will not be shown to him, so does the FaceBook gives the same access token and expiry time as it has given to the other app or does it create a new access token and a new expiry time?

  2. So after the expiry time, user will be presented the FaceBook login page again? I really don't want this to happen, is this is way to avoid it.


Solution

  • One solution that i can think of this to make a request with the permission for offline_access, in which case the token will never expire, any other solution guys?