Codeigniter + HAuth,身份验证失败! Facebook 返回了无效的用户 ID

Codeigniter + HAuth, Authentication failed! Facebook returned an invalid user id

我正在使用带有 Codeigniter 框架的 HybridAuth 库,所有其他社交登录都正常工作除了 "Facebook Social Login",我收到错误 "Authentication Failed! Facebook returned an invalid user Id."

我尝试了所有可用的答案,例如:

我苦苦挣扎了 2 天,尝试了所有可能的答案,仍然无法弄清楚问题出在哪里,任何帮助都会非常感激。

注意: CURL 在我的服务器上正常工作

更新

代码文件
配置->hybridauthlib.php

$config =
array(
    'base_url' => '/hauth/endpoint/',

    "providers" => array (
        "Facebook" => array (
            "enabled" => true,
            "keys"    => array ( "id" => "xxxxxxxx", "secret" => "xxxxxxxxxx" ),
        ),
);

第三方->hybridauth->config.php

return 
array(
"base_url" => "/hauth/endpoint/", 
"Facebook" => array ( 
            "enabled" => true,
            "keys"    => array ( "id" => "", "secret" => "" ),
            "trustForwarded" => true,
        ),

我还按照其他开发人员的建议对 third_party->hybridauth->Hybrid->thirdparty->facebook->base_facebook.php 进行了更改

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

Facebook 重定向 URI

http://localhost/myproj/index.php/hauth/endpoint?hauth.done=Facebook

我也发现了同样的问题并解决了。请转到此 URL: https://github.com/aviansh26dec/hauth