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

Login gets stuck in loop in 9.0.0 if Facebook app is installed #514

Closed
4 tasks done
SeriouslySam opened this issue Feb 2, 2021 · 7 comments
Closed
4 tasks done
Labels

Comments

@SeriouslySam
Copy link

Checklist

Environment

Describe your dev environment here, giving as many details as possible. If you have them, make sure to include:

  • Unity Editor Version: 2018.4.23
  • Unity SDK Version: 9.0.0
  • Installation Platform & Version: [iOS] version 12.1.2, 12.4.1, 11.4.1

Goals

I want to do Facebook login in the the application.

Expected Results

Facebook login to complete successfully.

Actual Results

After pressing the Facebook login button in the application, it gets forwarded to WebView with a button to 'Log in with the Facebook App', it also automatically asks to "Open this page in 'Facebook'"? Facebook app then says "you're already logged in.. Would you like to continue?" with a 'continue' button. Once the 'Continue' button is pressed, it returns to WebView with 'Log in with the Facebook app' which again takes you to app and then to webview and then to app...

Steps to Reproduce

  • Have iOS12 device & FB Unity SDK 9.0.0
  • Have Facebook app installed on the device
  • Try to login to Facebook from an app using Facebook Login.
  • This then leads to the loop mentioned above.

We've reproed this on both iOS12 and iOS11. iOS14 seems to be only using webview, and not forwarding to app. iOS13 we have not tested.

Bug is also tracked by Facebook at https://developers.facebook.com/support/bugs/436228210835738/

@ppansy
Copy link
Contributor

ppansy commented Feb 3, 2021

Hi @SeriouslySam, thank you for reporting this issue! Could you please provide the app name?

@SeriouslySam
Copy link
Author

App is Best Fiends (https://apps.apple.com/us/app/best-fiends-puzzle-adventure/id868013618)

@ming060
Copy link

ming060 commented Feb 4, 2021

I had a similar issue when I import AppsFlyer SDK into my project.

I follow the steps below to fix it.
https://github.com/AppsFlyerSDK/appsflyer-unity-plugin/blob/master/docs/iOS-Swizzling-Guide.md

Related post on stackoverflow: https://stackoverflow.com/questions/35100809/unity-facebook-sdk-ios-9-2-not-returning-to-app

@ppansy
Copy link
Contributor

ppansy commented Feb 4, 2021

@SeriouslySam Can you confirm that the same code works for previous SDK versions? If not you can try to check if you have any conflicting libraries as @ming060 suggested.

@SeriouslySam
Copy link
Author

Thank you @ming060 , Appsflyer Swizzling was indeed the issue for us. After I turned that on, the login works again normally.

@LongLostPenPal
Copy link

LongLostPenPal commented Feb 10, 2021

Thank you @ming060 , Appsflyer Swizzling was indeed the issue for us. After I turned that on, the login works again normally.

I had a similar issue, but I'm not using AppsFlyer.
My situation :
Unity Editor Version: 2019.2.21f
Unity SDK Version: 9.0.0
when click FB login button in game , if user has login in WebView , it has a 'continue' button in WebView. Once the 'Continue' button is pressed user will jump back to game but FB.IsLoggedIn is false in FB login callback at this time。Login gets stuck in loop if user not login in WebView。
i use FB.LogInWithReadPermissions to login, not limit mode.
All works well for previous SDK versions ( 8.1.1) .
help please

@kaninhot004
Copy link

Thank you @ming060 , Appsflyer Swizzling was indeed the issue for us. After I turned that on, the login works again normally.

I had a similar issue, but I'm not using AppsFlyer.
My situation :
Unity Editor Version: 2019.2.21f
Unity SDK Version: 9.0.0
when click FB login button in game , if user has login in WebView , it has a 'continue' button in WebView. Once the 'Continue' button is pressed user will jump back to game but FB.IsLoggedIn is false in FB login callback at this time。Login gets stuck in loop if user not login in WebView。
i use FB.LogInWithReadPermissions to login, not limit mode.
All works well for previous SDK versions ( 8.1.1) .
help please

Problem still there.
Unity 2019.4.30f1
Unity Facebook SDK 11.0.0

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

No branches or pull requests

5 participants