Yet another Facebook app/API post I know, but please read carefully.
For better clarity, I'll add here that we're currently in 2021, March 29, their API has changed quite a lot over the last few months (and might change as well), therefore most answers on StackO aren't working anymore.
Furthermore, IMO their documentations aren't fully updated yet to the current version, and have things that doesn't exist anymore (like Dev/Live mode for ex).
After making sure that my app can work with my localhost by changing:
Settings -> Basic -> App Domains -> 'localhost'
-
Settings -> Basic -> Add platform -> Website -> 'http://localhost:8000/'
) Add Product -> Facebook Login -> leave everything empty
- Make sure to run my localhost with
localhost
and not127.0.0.1
.
It seems that the Facebook JavaScript SDK doesn't allow its method to be called from an http
url.
As I'm working on localhost (so not in https) it is quite annoying. After checking the FB documentation and some tooltips in the Facebook login
settings, it seems that localhost should work without https enabled. And if that wasn't enough: the Enforce HTTPS
button is greyed-out and cannot be turned off anymore.
I also tried to put something in the Valid OAuth Redirect URIs
, but the field/tooltip doesn't let you put http://localhost:8000/
:
http://localhost redirects are automatically allowed while in development mode only and do not need to be added here.
As mentioned above, there is no such thing as development mode anymore, or at least no button or anything to change or even see the mode on their new interface.
Did anyone managed to make his localhost work with the JS SDK?
Ngrok and other answers are indeed appreciated, but I would like to know first if there is a "real" solution (on FB side) at this problem ("No there isn't yet" is an acceptable answer as it will probably save a lot of time for other people). Thanks a lot!
https://stackoverflow.com/questions/66848225/facebook-app-localhost-force-https-problem March 29, 2021 at 10:55AM
没有评论:
发表评论