Iniciar sesión con Facebook usando php SDK no funciona

I'm using facebook's php sdk for a login system on localhost. 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:

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

I have double-checked all the code and all the source php sdk files needed. 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.

preguntado el 28 de mayo de 14 a las 13:05

'it suddenly stopped working all by itsself' type questions are almost impossible to answer over a message board im afraid. Could be any number of problems. -

Yeah. I moved around a bunch of files in htdocs, but didn't mess with any of the fb code. Can't figure out what might have happened. -

You have my sympathy, but thats about all i can give to you. Next time make backups before refactoring. -

Sorry if it's a silly question, but did you update your App URL in the developer console at any stage? -

Nope. The problem is something else. -

1 Respuestas

As far as I can see Facebook requires the registration of your web site for the ap, to prevent hackers. Therefore I don't think it can ever work if your running it on localhost, it would have to run on a domain name.

respondido 31 mar '16, 05:03

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.