Stuck at OAuth2 Facebook connector

I followed the tutorial couple times but instead of seeing

I get

Well check the error message with Facebook docs.

What I’ve seen is that in every case related to the issue refers to invalid Valid OAuth Redirect URIs. What we’ve been discussing here. The error message tells me that https://liveworkoutpass.com/dmxConnect/api/Security/fb_login.php is not whitelisted even though it should be.

why your port is 80 if you are using https ???

Please, tell me more… What it should be, where do I find it, could this cause the error?

I tried to add the code manually provided by fb developers doc to an empty .php file just to check whether I’m missing any of the steps mentioned on the tutorial. The manual process seems to work fine. Now I’m wonder if there’s any issue between Wappler and fb?

Here’s the manually coded page: https://liveworkoutpass.com/fblogin.php

Here’s what happened after I copy/pasted then code

It’s already explained in the tutorial really detailed where to copy and paste data from: https://docs.wappler.io/t/using-oauth2-connector-with-facebook/12345#Setting-up-the-Server-Action

I am not sure where did you copy what you show on the screenshot from but the quotes are wrong.
I’d like to ask you again: please open the tutorial and follow it step by step.
I am following this tutorial every time i need to setup a facebook login functionality - i never have any issues.

I actually have a need to add one of these facebook login setups to an existing site today, so I will follow the tutorial from Teo and if i happen to note any step that I find unclear i will post my outcome. But on the surface it seems like he must have covered everything.

When working with any 3rd party service, there can be issues, not caused by Wappler. I was told to follow the tutorial by Teo, and that is what I do. In fact I have re-installed everything, done everything step by step, many times… Not mixing any other tutorials. What I did was searching for the solution to the error that blocks the url. Obviously the reason is that fb is blockin any url I type in the Oauth url redirection field. And that is what I’m trying to solve.

Please let me know how did you manage to get past the test connection phase. I give up for now. I haven’t found any solutions, yet it doesn’t make any sense to keep struggling few more days to make this work. It seems that fb doesn’t like me. haha.

I am about to test this out right now, so I will let you know how my testing goes in a few moments.

Can you also please share your public setting. Oauth redirect urls, button links etc.
:+1:

So I basically landed up with the same problem as you did to be very honest.

After a little researching through Google I found an article explaining about the differences in facebook accounts created after March 2018

Which changes a few things.

I did not get very far before hitting this error, I was still on the first server action step, where you add the OAuth Provider, then the OAuth Authorise and then the API Action step.
Once those 3 steps were done, i saved my server action and clicked the Open In Browser button and was right away met with the error about
Can’t Load URL: The domain of this URL isn’t included in the app’s domains.
Here is a screenshot of the step I was up to.

The error is a little silly as it points you towards adjusting your Settings > Basic > App Domains here

Which does not work, you actually need to go PRODUCTS > Facebook Login > Settings area. Here is a screenshot of what I had to add and then everything worked perfectly as expected.

After adding my Valid OAuth Redirect URIs and hitting save, I then went back to Wappler and clicked the Open In Browser icon from Server Connect again and was met with the expected

Obviously @Petri in your use case your URL to add to that area will be more like https://liveworkoutpass.com/dmxConnect/api/Security/fb_login.php, hit save and test just the server action to make sure that is working and then you can continue trying from your actual button on your page.

Can you please check out my video and see what I’m doing wrong?

choose " Client Credentials " and “verify SSL”
and use your access_token in api action

access2

access

It all looks the same as mine on the facebook side, however are you sure you do not have an extra space before the word api
https://liveworkoutpass.com/dmxConnect/api/Security/fblogin.php
https://www.liveworkoutpass.com/dmxConnect/api/Security/fblogin.php
It may just be the view on the video but it does look like there is an added space in yours, please copy the ones I have given above.
Also for testing purposes on your server connect file please remove the , name from the query parameters. So you just have fields email
If that works, when you add name back, I do not think it should be comma space name, i think it should just be email,name

It is probably something stupid, but I noticed the port number is also in the url
https://liveworkoutpass.com:80/dmxConnect/api/Security/fblogin.php.

Try to put that exactly so in facebook (with the :80 added)

Funny you should mention that Patrick, as when I was testing something using my own server and then moved it to Hyperbytes (Brians) server, I noticed that Brians server auto added the :80 like that after my domain name. Seems to be a server setting difference that causes that.

Probably because port 80 is not the default port for https, normally it would run at port 443 and port 80 is for normal http.

1 Like