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
Comment | File | Size | Author |
---|---|---|---|
#8 | simplefbconnect-FixMultilingualUrlReturn-2962173-12732217.patch | 1.65 KB | frondeau |
#3 | 2018-04-19 16_38_37-Facebook Login - Facebook for Developers.png | 60.2 KB | jan_p |
#3 | 2018-04-19 16_33_44-Program Manager.png | 148.15 KB | jan_p |
Comments
Comment #2
masipila CreditAttribution: masipila commentedCould 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
Comment #3
jan_p CreditAttribution: jan_p commentedThanks for the quick reply! files are attached
Comment #4
jan_p CreditAttribution: jan_p commentedComment #5
frondeau CreditAttribution: frondeau commentedSame 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 ?
Comment #6
masipila CreditAttribution: masipila commentedHi @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
Comment #7
frondeau CreditAttribution: frondeau as a volunteer commentedHello @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
Comment #8
frondeau CreditAttribution: frondeau as a volunteer commented@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
Comment #9
frondeau CreditAttribution: frondeau as a volunteer commentedIssue created : https://www.drupal.org/project/simple_fb_connect/issues/2994854
Comment #10
masipila CreditAttribution: masipila commentedHi,
What is the difference in these two issues? The patches seem to be overlapping... I'm quite confused...
Markus
Comment #11
frondeau CreditAttribution: frondeau as a volunteer commented@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,