Facebook login api via https using localhost

房东的猫 提交于 2020-01-25 06:53:08

问题


Hello I am trying to connect via login facebook and is give me an error on redirection url step because must have an https domain

the question is how I configure xampp to run https localhost address that making me able to redirecting to facebook page .


回答1:


On October 6, 2018, all apps will be required to use HTTPS.

HTTPS Facebook Login

You will need to generate a self singed certificate, put in your local server, then open HTTPs port on your server.

Last but not least, you will need to add https://localhost:{your-port} in your app Settings (developers.facebook.com)




回答2:


Thanks man is working by configuring apache and vhosts to run like as https://localhost

<VirtualHost *:443>
   DocumentRoot "D:\xampp\htdocs\_project\public"
   ServerName www.website.com 
   SSLEngine on
   SSLCertificateFile "conf/ssl.crt/server.crt"
   SSLCertificateKeyFile "conf/ssl.key/server.key"
</VirtualHost>

and finally, go to facebook login and add valid OAuth redirection URL

cheers



来源:https://stackoverflow.com/questions/57256228/facebook-login-api-via-https-using-localhost

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!