facebookarchive / react-native-fbsdk

A React Native wrapper around the Facebook SDKs for Android and iOS. Provides access to Facebook login, sharing, graph requests, app events etc.
https://developers.facebook.com/docs/react-native
Other
2.99k stars 908 forks source link

logInWithPermissions will not redirect back if user choose to login in facebook app #741

Closed miracle0930 closed 4 years ago

miracle0930 commented 4 years ago

🐛 Bug Report

When calling LoginManager.logInWithPermissions(['public_profile']), there will be a poped up page with two options, 'Log in with the Facebook app', and 'Log in with phone or email'.

If using 'Log in with phone or email', the whole process will be working correctly.

But when using 'Login with the Facebook app', it will bring user to Facebook app and NEVER redirect back, no matter user click continue or cancel in that page, it will just give user a white page and stay there forever

To Reproduce

  1. LoginManager.logInWithPermissions(['public_profile']);
  2. Click Log in with the Facebook app;
  3. Click 'open' when asking 'Open in Facebook?';
  4. Click 'Continue' or 'Cancel' will give you a white page and stay there forever.

Environment

react-native: ~0.61.5, react-native-fbsdk: ^1.1.2

raj-2020 commented 4 years ago

Facing that same issue. 🐛

miracle0930 commented 4 years ago

I found the solution, select your project -> targets -> info tab -> scroll down to URL Types, need to fill your fb scheme like this Screen Shot 2020-04-30 at 5 14 17 PM