I’m using the webtechnick Facebook plugin to use Facebook authentication in my cakephp application.
It was working fine till yesterday. Now whenever I try to login using Facebook details, the login button will change to logout but I can get the Facebook id or other information.
What is the problem?
EDIT
I am using
if($this->Connect->user()){
.............
.............
}
function in app_controller.php $this->Connect->user() function will give the logged in users’s information, if the user’s Facebook username/password is correct.
I’m getting an empty result for this function.
<?php
echo $this->Facebook->logout();
?>
The above code will give me a Facebook login button, when the user is not logged in to Facebook, after a successful login using Facebook credentials this button will change into Facebook logout.
Now I am getting this Facebook login button changed into logout, but no Facebook details.
I solved it,
it is because difference between the site url and url that I use to register in the facebook API.
In facebook I use www. prefix for registering my app, but sometimes I use to access the site without ‘www.’ prefix. This makes the problem.