Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in fbOAuth() #170

Open
leo-filgueira opened this issue Feb 9, 2018 · 14 comments
Open

Error in fbOAuth() #170

leo-filgueira opened this issue Feb 9, 2018 · 14 comments

Comments

@leo-filgueira
Copy link

leo-filgueira commented Feb 9, 2018

I'm trying to use the package but I prefer not to use a temporary access. To do this, I'd have to use fbOAuth() function. I've followed the steps at : I've created the app and put the url http://localhost:1410/. When I press Enter in R Console, a window opens with this message:

When I press Ok, this message is printed:

Authentication complete. Please close this page and return to R.

But, in R, the console prints: Authentication complete. Error in oauth2.0_access_token(endpoint, app, code = code, user_params = user_params, : Bad Request (HTTP 400). Failed to get an access token.

Is this a Facebook API problem? The solution is just use the temporary access?
Thanks

@adrauc
Copy link

adrauc commented Mar 7, 2018

Yes, Facebook had some changes. Can be fixed:
-Go to the dashboard of your app
-left: click on "Facebook Login" -> Settings
-Now paste in the field "Valid OAuth redirect URIs" http://localhost:1410/ - save changes
-fbOAuth() should now work again in R again

@orcololo
Copy link

Can't get token too.
It says: "Insecure Login Blocked: You can't get an access token or log in to this app from an insecure page. Try re-loading the page as https://" any fix?

@hauteville86
Copy link

hauteville86 commented Mar 20, 2018

I have received exactly the same message when I tried to connect with fbOAuth. Perhaps the reason is the "Enforce HTTPS for OAuth Redirects and SDK APIs" option in Facebook Login Settings, which cannot be disabled.

According to the Facebook help (https://developers.facebook.com/docs/facebook-login/security): This setting requires HTTPS for OAuth Redirects and pages getting access tokens with the JavaScript SDK. All new apps created as of March 2018 have this setting on by default and you should plan to migrate any existing apps to use only HTTPS URLs by March 2019.

@lucsulla
Copy link

Same issue. I believe it has to do with http://localhost:1410/ not being an https:// address. I can't even save it as a valid Oauth redirect it would seem.

@jmanuoz
Copy link

jmanuoz commented Apr 10, 2018

Same problem, how can i change redirect rfacebook url on login?

@Avee692
Copy link

Avee692 commented Apr 19, 2018

did any of you guys come right?

@jmanuoz
Copy link

jmanuoz commented Apr 19, 2018 via email

@truongnmt
Copy link

truongnmt commented Apr 24, 2018

You could create a simple https for localhost as in here:
https://stackoverflow.com/a/49363740/3280050

@devktpx
Copy link

devktpx commented Jun 21, 2018

I have exactly the same problem as @leo-filgueira . @truongnmt suggested link sounds promising. Has anyone tried this solution? Has anyone found a simpler solution in the mean time?

@microsoftjulius
Copy link

its still the same issue with me

@truongnmt
Copy link

truongnmt commented Jun 25, 2018

Hey today I check my app in facebook and I see option to disable Enforce HTTPS for OAuth Redirects and SDK APIs . So things work again on localhost.

@bryn-g
Copy link

bryn-g commented Jun 25, 2018

Developer News: Requiring HTTPS for Facebook Login (2018-06-08)

This facebook post also states that:

You will still be able to use HTTP with “localhost” addresses, but only while your app is still in development mode.

Can anyone confirm that with Enforce HTTPS set to NO and the app set to development mode that HTTP authentication works again for old and new apps?

@OrikH
Copy link

OrikH commented Nov 17, 2018

hi, it writes: HTTPS is required for all Redirect URIs. -when I paste : http://localhost:1410/ Who know what should I do? I am using it for text analysis in R. Thanks in advance

@abdelkrk
Copy link

has anyone found a solution ? i am stuck y'all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests