Authentication failed! Facebook returned an invali

2019-09-20 16:16发布

This question already has an answer here:

I am using a module on opencart 2.0.1.1 named Social Login Free and using facebook-php-3.2 Login with facebook was working correctly but now when a user clicks on login with facebook it takes it correctly to the facebook oath login dialog and when user clicks continue it returns this error Authentification failed. The user has canceled the authentication or the provider refused the connection. Ooophs, we got an error: Authentication failed! Facebook returned an invalid user id. I have tried several solutions but failed.

  public static $CURL_OPTS = array(
    CURLOPT_CONNECTTIMEOUT => 60,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT        => 60,
    CURLOPT_USERAGENT      => 'facebook-php-3.2',
    CURLOPT_SSL_VERIFYPEER => false,
    CURLOPT_SSL_VERIFYHOST => false
  );

protected $trustForwarded = true;
protected $allowSignedRequest = false;

Nothing is working please help.

Update :

It is not a duplicate as in my case I had to upgrade facebook-php-sdk to v5 and it solved my problem! tada...

1条回答
欢心
2楼-- · 2019-09-20 17:08

Facebook upgraded api graph version from 2.2 to 2.3 what i did read so far is that the access token is now different than before and json encoded. The change did happen on 03.25.2017 I have the same problem with hybridauth but no idea how to solve. I hope that helps.

facebook graph api not work from 2.2 to 2.3

查看更多
登录 后发表回答