facebook / facebook-sdk-for-unity

The facebook sdk for unity.
https://developers.facebook.com/docs/unity
Other
487 stars 256 forks source link

Unity SDK v11 Login not working on Android with FB Lite app installed on device #612

Open MTPirate89 opened 2 years ago

MTPirate89 commented 2 years ago

Checklist

Environment

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

Goals

I want to make login into Facebook on Android when FB Lite app is installed on device

Expected Results

Login window appears either in web view or in FB app

Actual Results

Login window closes immediately after showing for a while and FB SDK returns result cancelled

Steps to Reproduce

  1. Create new empty Unity project
  2. Import Facebook Unity SDK v11 unitypackage
  3. Make sure you have a button with FB.LogInWithReadPermissions
  4. Setup and build the sample app with CompileSdkVersion 19 and TargetSdkVersion 30 for Android
  5. Install FB Lite app on device
  6. Run the app on Android 7/9/12 device or emulator
  7. Initialize FB
  8. Log in with FB.LogInWithReadPermissions
  9. FB overlay shows and closes immediately
  10. SDK returns result Cancelled without user interaction

Notes

For devices running on Android 11/12 removing queries tag from AndroidManifest.xml helped to solve the issue, but on devices running on Android 7 (Redmi 5 for example) that didn't help

lucasrybz commented 1 year ago

Any updates? I have similar problems. When logging with FB App, it returns a "session closed" problem. Without FP App installed, there is no problem.