Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The app does not return to the previous state after logging in on the Facebook app login screen. #2304

Open
5 tasks done
phillip5094 opened this issue Nov 23, 2023 · 1 comment

Comments

@phillip5094
Copy link

phillip5094 commented Nov 23, 2023

Checklist before submitting a bug report

Xcode version

14.3

Facebook iOS SDK version

14.1.0

Dependency Manager

CocoaPods

SDK Framework

Login

Goals

Upon logging in to the Facebook app, it should return to the previous app, and the successful login callback must be invoked.

Expected results

Upon logging in to the Facebook app, it should return to the previous app, and the successful login callback must be invoked.

Actual results

When I invoked the login API of the Facebook iOS SDK, the transition to the Facebook app worked correctly. However, after logging in by selecting a profile in the Facebook app, although the Facebook app itself logged in, it did not return to the previous app, and the callback was not triggered.

RPReplay_Final1700716527

Steps to reproduce

  1. Prepare the Facebook app without an active login. (If already logged in, log out.)
  2. Call the loginManager.logIn API with LoginConfiguration.tracking set to .enabled.
  3. Transition to the Facebook app, and select the profile image within the Facebook app.
  4. While the login is successful within the Facebook app, there is no transition back to the app that invoked the loginManager.logIn API, and the callback is not triggered.

Code samples & details

@IBAction func invokeLoginMethod() {
    loginManager.logIn(
        viewController: self,
        configuration: .init(permissions: [.publicProfile, .email], tracking: .enabled)
    ) { [unowned self] result in
        switch result {
        case .cancelled:
            self.presentAlert(
                title: "Cancelled",
                message: "Login attempt was cancelled"
            )
        case .failed(let error):
            self.presentAlert(for: error)
        case .success:
            self.updateLoginButton()
            self.showLoginDetails()
        }
    }
}
@fuwenhuai
Copy link

I also encountered this problem. Have you resolved it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants