Registration/Log in is not working on iOS in FaceBook in-app-browser
1

I've integrated Facebook registration/login using the JavaScript SDK, specifically using FB.login() to obtain an access token upon user login. This approach works perfectly across desktop and mobile browsers, including Instagram's in-app-browser. However, it does not work in Facebook's in-app-browser, particularly on iOS. I found this in the documentation: ```In-App Browsers and the JavaScript SDK

The JavaScript SDK normally relies on popups and callbacks to complete a Login. For some in-app browsers that suppress popups, this can fail. When this happens, the SDK will automatically attempt to redirect, with an access token, to the page that invoked it. It can only do this redirect safely if the full URI of the page is listed in the Valid OAuth Redirect URIs.```

If in-app browser scenarios are important for your web app, you should add the domain of your login page to the Allowed Domains and also its full URI (including the path and query parameters) to the Valid OAuth Redirect URIs. If you have a lot of variation in the URIs where Login happens for your app, you can manually specify a fallback_redirect_uri as an option in the FB.login() call so you only need to add that one entry to your Valid OAuth Redirect URIs list. The solution works fine on Android devices, where the Facebook in-app-browser redirects successfully, but on iOS, clicking the "Continue with Facebook" button results in no action. During debugging, I noticed window.FB exists, but it seems like the login method is missing, or maybe I overlooked something. I've also observed that on some sites, the Facebook login option works in the in-app-browser, while on others, it's hidden or is not working. Does anyone have suggestions on how to get it working on iOS Facebook in-app-browser too? Any insights would be greatly appreciated!

Tigran
Đã hỏi 20 giờ trước