脸书常见问题
How do I implement Facebook login in Messenger browser (web-view)?
In Facebook Messenger, there're quite many scenarios which require us to create an in-app web-view, one of them will be account linking with Facebook login. Some clients rely heavily on user's Facebook login to identify the user's account.
However, since Facebook Messenger will block any pop-up window appeared within the in-app web-view, the login button provided by Facebook Javascript SDK on the web-view will not work in this situation.
To resolve, we suggest you to manually create a login flow for users on that landing page.
- Go to Facebook App Dashboard. Under "Products", choose
Facebook Login
>Settings
. - Under "Client OAuth Settings", switch on an option called Embedded Browser OAuth Login.
- Add your custom redirect URL(s) under "Valid OAuth Redirect URIs".
Custom Redirect URL(s) Configuration
- Follow the official Facebook guide to set up a Facebook login by Redirect URL.