I'm trying to implement Facebook login and I found my access token expiring after an hour. Now I simply refresh the token when the app is loaded and the currentToken is not nil.
if FBSDKAccessToken.currentAccessToken() != nil {
FBSDKAccessToken.refreshCurrentAccessToken(nil)
let storyboard = UIStoryboard(name: "TabBar", bundle: nil)
let tabBarController = storyboard.instantiateInitialViewController()
self.presentViewController(tabBarController!, animated: true, completion: nil)
}
Now I realize that users aren't going to be using my app every hour so I want to have their Facebook login work even if the app is closed for something like a day or a week. I will have their facebookID stored in the keychain so I can use that to check if there's a currently logged in facebook user. However, I don't currently see a way I can change the expiration date of the access token.