简体   繁体   English

使用php SDK登录Facebook无效

[英]Login with facebook using php sdk not working

I'm using facebook's php sdk for a login system on localhost. 我正在使用Facebook的php sdk作为本地主机上的登录系统。 It was working fine without any problems. 它工作正常,没有任何问题。 But when i try to login now, after clicking the login button it just brings me back to the same page without actually logging me in and changes the url to something like this: 但是,当我现在尝试登录时,单击登录按钮后,它仅使我返回同一页面,而无需实际登录,并将URL更改为如下所示:

http://localhost/test.php?code=AQA6J5GuQQFCpc9mkOOmuR2...etc

I have double-checked all the code and all the source php sdk files needed. 我已经仔细检查了所有代码和所需的所有源php sdk文件。 They are all there and haven't been changed from the last time i was able to successfully login. 它们都在那里,自上次我能够成功登录以来从未更改过。 But for some reason it isn't working. 但是由于某种原因,它无法正常工作。 Can someone please help me out. 有人可以帮我吗。

As far as I can see Facebook requires the registration of your web site for the ap, to prevent hackers. 据我所知,Facebook要求您为ap注册您的网站,以防止黑客入侵。 Therefore I don't think it can ever work if your running it on localhost, it would have to run on a domain name. 因此,如果您在localhost上运行它,我认为它永远无法工作,而必须在域名上运行它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM