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

The method FB.api will stop working when called from http pages in 24 days. #240

Closed
Yamilquery opened this issue Sep 11, 2018 · 12 comments
Closed

Comments

@Yamilquery
Copy link

I get the next warnings in console. I think it's because we'll need to update the Facebook API.

index.js:2178 The method FB.getLoginStatus will stop working when called from http pages in 24 days.  Please update your site to use https for Facebook Login. https://developers.facebook.com/blog/post/2018/06/08/enforce-https-facebook-login/
__stack_frame_overlay_proxy_console__ @ index.js:2178
a @ sdk.js:53
(anonymous) @ sdk.js:120
(anonymous) @ sdk.js:117
window.fbAsyncInit @ facebook-login-with-button.js:1
a.__wrapper.a.__wrapper @ sdk.js:117
(anonymous) @ sdk.js:178
setTimeout (async)
_sdkBound @ sdk.js:22
(anonymous) @ sdk.js:178
require @ sdk.js:24
require @ sdk.js:24
__d @ sdk.js:24
(anonymous) @ sdk.js:179
(anonymous) @ sdk.js:213
(anonymous) @ sdk.js:213
index.js:2178 The method FB.api will stop working when called from http pages in 24 days.  Please update your site to use https for Facebook Login. https://developers.facebook.com/blog/post/2018/06/08/enforce-https-facebook-login/
@mbrochh
Copy link

mbrochh commented Sep 13, 2018

I believe this just warns you about HTTP pages. You can set the version to 3.1 when mounting the component:

<FacebookLogin
  appId={...}
  fields="name,email"
  version="3.1"
/>

@kaizenkaizen
Copy link

kaizenkaizen commented Sep 22, 2018

@mbrochh This didn't resolve the issue, still seeing this in console:

The method FB.api will stop working when called from http pages in 13 days.

@fatchat
Copy link

fatchat commented Sep 23, 2018

Has FB provided some way to use { FB.api, FB.login } during dev i.e. from http://localhost?

@fatchat
Copy link

fatchat commented Sep 23, 2018

Has FB provided some way to use { FB.api, FB.login } during dev i.e. from http://localhost?

Btw the announcement from FB is here:

https://developers.facebook.com/blog/post/2018/06/08/enforce-https-facebook-login/

; they clearly state that we can only use localhost while the app is in dev mode. They don't say what to do once the app has been released

@mbrochh
Copy link

mbrochh commented Sep 24, 2018 via email

@vigneshprasad
Copy link

If you're using the standard Create React App model you can include HTTPS=true before typing the start command so something like HTTPS=true npm start. This helped solve the problem for me at least from the client side.

@kaizenkaizen
Copy link

kaizenkaizen commented Sep 29, 2018

@vigneshprasad Brilliant! That worked really well the errors went away 👍

@arrowrs
Copy link

arrowrs commented Nov 6, 2019

You could move your localhost to https (if sever running on apache)-
https://stackoverflow.com/questions/4221874/how-do-i-allow-https-for-apache-on-localhost

@Diana0604
Copy link

Is there anything equivalent as the HTTPS=true for electron?

@stevechude
Copy link

stevechude commented Oct 11, 2022

@ vigneshprasad that HTTPS=true npm start isn't working at all... the page on localhost refuses to load on chrome browser and rather displays a security alert error.
How do i resolve this error in my react app "The method FB.login can no longer be called from http pages".

@vigneshprasad
Copy link

Hey @stevechude my solution may be outdated I'm really not sure. Unfortunately I have not kept up with this project so I'm not sure what's the correct solution here. Good luck I hope someone else is able to help you.

@Steven-zion
Copy link

Am getting same err when using react-facebook. here is what fixed my issue - on the meta for developers dashboard i clicked the top left corner dropdown and created a test up version of my app and then i replaced my appId with the one of a test app, it worked i got an accessToken. it seems the it wont work with the production app unless you create a test app

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

10 participants