1
votes

I'm using webtechnick Facebook plugin to use Facebook authentication in my cakephp application. It was woking 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 will be 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 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 the 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.

1
Without any code it's not possible to answer your question. Please provide more details. - Tim

1 Answers

3
votes

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.