5

I have created a Facebook Login for my app, which is built in React.

The login works perfectly on desktop browsers (and when I use desktop mode on my phone).

The issue is that when I try to login on my phone I get the following error:

RL Blocked: This redirect failed because the URI is not whitelisted in the app's ...

Why is the URL for the mobile different than the desktop version AND how do set up my Facebook whitelisted sites?

I have printed the URL onto the screen (same on mobile and desktop). I have tested on android and on iPhone. Same error

I have read facebook developper docs - no luck.

Tyler
  • 89
  • 2
  • https://stackoverflow.com/questions/37001004/facebook-login-message-url-blocked-this-redirect-failed-because-the-redirect – Richard Dapice Oct 01 '19 at 04:37
  • 1
    Here is the URL I am getting from FB https://m.facebook.com/dialog/oauth?client_id=XXX&redirect_uri=https%3A%2F%2Fconnactiveclub.com%2Ffacebook&state=facebookdirect&return_scopes=false&scope=public_profile%2Cemail&response_type=code&auth_type Also, I can confirm that https://connactiveclub.com/facebook has been whitelisted. – Tyler Oct 01 '19 at 04:46
  • Just add `isMobile={false}` For your reference https://stackoverflow.com/questions/43555476/facebook-login-not-working-in-mobile-browsers/70359179#70359179 – bemygon Dec 15 '21 at 06:24

2 Answers2

1

Just add isMobile={false} and everthing will work like a charm!

bemygon
  • 83
  • 8
0

You can whitelist a domain from your facebook page and facebook app.

For an app, you need to goto the app settings and put your url.

I got this type of error due to ad blocking feature in the mobile. Specially when the login window is a popup. I think this will be your problem too. Please check for it.