Having installed the module and configured the FB app, Facebook is returning the following message when trying to use facebook login:

"URL blocked: This redirect failed because the redirect URI is not white-listed in the app's client OAuth settings. Make sure that the client and web OAuth logins are on and add all your app domains as valid OAuth redirect URIs."

I have configured the redirect URI as per the instructions, and looking at the uri facebook is redirecting to, this has the colons and slashes replaced with character codes; so instead of "https://" it reads "https%3A%2F%2F". The other slashes in the URI have also been substituted.

Is this what is causing the problem, and what can I do to fix this?

thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jan_p created an issue. See original summary.

masipila’s picture

Category: Bug report » Support request
Status: Active » Postponed (maintainer needs more info)

Could you please provide a screenshot of
A) your Simple FB Connect module settings (censor app id and app secret)
B) your FB app settings where the valid oauth url has been defined?

Please change the status back to 'Active' when replying.

Cheers,
Markus

jan_p’s picture

Thanks for the quick reply! files are attached

jan_p’s picture

Status: Postponed (maintainer needs more info) » Active
frondeau’s picture

Same error on return url when using language prefix.

In function simple_fb_connect_get_return_url(), url is used and return absolute url of 'user/simple-fb-connect/return'.

When these urls are prefixed with language, then return url is //user/simple-fb-connect/return.
If these urls aren't configured in Facebook APP then the error is returned.

Why wouldn't we concatenate $base_url + '/user/simple-fb-connect/return' in function simple_fb_connect_get_return_url(), instead of use of url() function ?

masipila’s picture

Hi @informaid!

If I understood correctly, the steps to reproduce are:
1. Install multiple languages
2. Configure language selection based on path prefix
3. Have the site running on https
4. Boom!

Could you please confirm that these were the steps to repro?

Are you able to provide a patch for the approach you suggested in #5? And have you by any chance tested that it works also with single language sites and when the site is using http and not https.

I'm more than happy to commit your suggested fix (it looks good at first glance) but I would really appreciate if we could get this thoroughly tested by the community. In other words, there are four permutations to test: with/without language path prefixes combined with/without https.

Cheers,
Markus

frondeau’s picture

Hello @masipila,
Thank you for answering and for waiting.
I confirm the steps of your baseline scenario as the site inside which I use the module simple_fb_connect is configured with multilanguage with language code in prefix.
So I haven't tested the other cases.
They could be tested further.
The patch is ready. However, I don't use $base_url but url() function with $options(language => '').
Best regards.
Fabienne

frondeau’s picture

@masipila,
Here is a patch to solve return url in simple_fb_connect when site is multilingual and urls are prefixed by language.
I hope it will help.
Regards

frondeau’s picture

masipila’s picture

Hi,

What is the difference in these two issues? The patches seem to be overlapping... I'm quite confused...

Markus

frondeau’s picture

@marsipila,

I 've created the new issue https://www.drupal.org/project/simple_fb_connect/issues/2994854 because I'm not sure this patch fixes the other issue. My issue might be quite different than the original one.

I confirm it's the same patch and apologize for the confusion.

Thank you for explain the steps to submit the patch to Drupal Community. I couldn't push it on Git (Drupal 7.2.x).

Regards,