Question Detail

Facebbo login facebook->getUser() returning 0

5 years ago Views 1411 Visit Post Reply

I used facebook login on my website. Every time I clicked on the facebook button  

getUser() function return 0 I have tried everything but it's not working.


Please anyone help me

Thanks in advance

Thread Reply


- 5 years ago

maybe this will help you 

Edit base_facebook.php library and replace existing getCode() function with

protected function getCode() {
$server_info = array_merge($_GET, $_POST, $_COOKIE);
    if (isset($server_info['code'])) {
        if ($this->state !== null && isset($server_info['state']) && $this->state === $server_info['state']) {
            $this->state = null;
            return $server_info['code'];
        } else {
            self::errorLog('CSRF state token does not match one provided.');
            return false;
    return false;