[SOLVED] FB Login domain problem

I am having the same problem. Have tried all combinations of domain, subdomain, putting the URL in the website part, using full URL and URL root, with and without https. all combinations in the app domains as well.
website : mentos cricket

we have tried all the things mentioned in this page but still encountering the same errors next day…it was workin yestrdy till the error of token outofboundexception. how to fix it plz reply asap

1 Like

My use case : Add a fbshare button in one of my website to post a image from url.

What i did(trying in localhost)

  1. Created a fb app to get an appid
  2. Using that app id in my html of website i initialized the fb javascript sdk
  3. i used fb api to create the request.

Issue

  1. When i click on share button and invoke fb api following error occurs
    Cannot load URL: the domain of this URL isnt included …

Resolution

  1. Go to you app in fb developers page
  2. Click on add platform. Give your website url as http://localhost:port/(your port where app is running)
  3. Add a domain as localhost.
  4. Save the changes
  5. Done
  6. FB why no proper documentation???
1 Like

thanks a lot

I literally joined Bubble just now to express my gratitude to the people who found this fix in this thread. And to share the one I found AFTER I’d already used your very helpfyl info. My info had been lying right around the corner from me inside the tool I was trying to set up: SNAP. Here’s the link to their page, confirming the awesomeness some of you shared: https://www.nextscripts.com/instructions/facebook-social-networks-auto-poster-setup-installation/
Good luck all!

In the left hand side select Products and add product. Then select Facbook Login.

I then added https://www.tharkii.com/ to the field ‘Valid OAuth redirect URIs’, and then everything worked.

Genius… u saved my day. Thanks a lot

@tharkii006 the only reason I signed up for this forum was to say thank you…I needed this solution for Facebook Auto Poster. Thanks

Thanks so much for the help everyone! However, it looks like FB will be updating its settings soon (see the image below). So far the only way I have gotten FB log in to work is when Use Strict Mode for Redirect URIs is No. What will have to change when FB updates the settings?

Having same problem… Whats wrong? https://made-with-love.xyz/
I can’t figure out.

I think I figured out how to get it to work with Use Strict Mode for Redirect URIs set to YES. According to facebook they are going to force this in March anyways. So pretty much do what everyone above has said. Make your app domain match your Site URL in “Facebook Login” settings (Settings > Basic: Type the same thing into App Domains and below under Website in Site URL) Then do what @zacmacc said (Facebook Login > Settings), except you can actually keep Strict mode on. If you go to the plugin settings in Bubble, it gives you the option to Use a generic redirect URL. Enter that URL into the Valid OAuth redirect URIs.


1 Like

What solved it for me was setting “Use Restrict Mode for Redirects URIs” to “No” AND just using the site URL specified under APP settings (http://www.domain.com) and not anything else. I got the info from this article

Yes it worked perfectly. Thanks for posting.

If this issue just started happening for you, it’s because Strict URI Matching went into effect March 2018 (as already mentioned by one other person). I found this article explaining the enforcement in December of 2017:

I have a Sprint Boot application that is using spring-social-facebook dependency to authenticate with Facebook. If you’re also using this dependency, the one thing none of the answers address is that the redirect uri needs to be exactly what your app is redirecting to.

In our case, the spring-social-facebook dependency appends /connect/facebook to the login request. So you’ll need to add this to your “Valid OAuth redirect URIs”:

For dev: http://localhost:8080/connect/facebook
For prod: https://yourdomain.com/connect/facebook (replace https with http accordingly)

The above resolved the issue for me. Hope it does for you as well!

1 Like

I’ve already made this change more, still giving the same problem :frowning:

I’ve solved this guys. This WILL work for you, please make sure you follow the instructions carefully. It is partly due to what aashish.patel said, which was 99% correct and he is amazing for it. But here is the extra 1% you’re missing.

Hover over your current Facebook button on your website, look at the URL of the button, your URL should look something like this:

Log into Facebook | Facebook

The important bit is here:

redirect_uri=https://www.gamerdating.com/social/facebook/connect&response

See? It literally says this is your actual redirect URI, or the Valid OAuth redirect URI that Facebook now needs from you.

Now cut it down to the “&” our site looks like this:

https://www.gamerdating.com/social/facebook/connect

Voila! That was our real redirect URI which we found without any guesswork, by just hovering over our facebook button. Yours will look different.

In the above example aashish.patel used:

For prod: PayRam: Accept Crypto payments on your server. A self hosted crypto payment service.

But remember your URI is unique to your website, and it can ALWAYS be found in the URL of your Facebook login button. All you need to do to get the URI of your Facebook button is to hover over it, and copy the URL at the button of your browser.

Remember Facebook has now forced you to use Strictmode, but all this is, is it is asking for the exact URI that you are using in your button here.

So for our website, our URI’s now look like this:

This should definitely fix your issues if you suddenly have a problem with people logging into your services after March 17th 2018.

If it helps tell your friends about GamerDating obviously :wink:

3 Likes

A combination of 2 things solved this for me:

  1. Putting the exact full address in the “Valid OAuth redirect URIs” field;
  2. Downloading and using the up-to-date version of PHP SDK (5.6.2).
1 Like

Great answers by everyone! It seems that Facebook made additional changes and the PHP SDK below the most recent one is not working anymore.

bud026’s answer solved it for me:

  • Newest PHP SDK 5.6.2

And don’t forget to do the proper settings on the facebook developers’ site as the people mentioned above.

You saved my day. I just registered on this forum to say thanks.
You earned :heart:. :wink:

This thread is great SEO for Bubble :grin: