Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug where the user is not logged in on subsequent sessions
Summary: Bug reported in GitHub: #695 "FB SDK doesn't keep user logged in on subsequent sessions". It's only happening in the last release of the SDK and on iOS according to user and partner reports. This diff fixes this issue. According to the instructions in the iOS SDK (https://github.com/facebook/facebook-ios-sdk/blob/41044df838ef3fefe600fb96b6560dc8a2b2a18a/FBSDKCoreKit/FBSDKCoreKit/ApplicationDelegate.swift#L55-L56), "Do not use the method initializeSDK if you are using the SDK within the context of the 'UIApplication' lifecycle", which is the case of the Unity SDK, "Instead use 'application(_:didFinishLaunchingWithOptions:)'" Basically, the didFinishLaunchingWithOptions method is called after state restoration has occurred (for example, when the app is launched again after it is suspended or in the background). It is needed to restore the user information, such as the access token. Reviewed By: GMc14 Differential Revision: D48560401 fbshipit-source-id: 6a6269ad8392db164638e24b04a666c71bfe5c7f
- Loading branch information