PHP HybridAuth 社交登录根本不起作用。重定向至 ?hauth.start=Facebook&hauth.time
2022-08-30 22:44:28
我试图让HybridAuth Social Login在这个简单的php网站上工作。已下载并安装混合身份验证。然后发现即使这些示例也不适用于社交登录(在远程服务器上也尝试过。
正常的signin_signup示例工作正常。但是,每当我点击链接登录社交网络(即Facebook,twitter)时,它都会将我重定向到(MY_BASE_URL/index.php?hauth.start=Facebook&hauth.time),而不会显示任何登录窗口/错误消息。
我已经仔细阅读了此处发布的文档和其他解决方案。调整了我的配置.php有一个像 http://example.com/index.php 这样的基本网址。但它就是没有回应。我错过了什么吗?我已经花了2天的时间。
这是我的配置.php
return
array(
"base_url" => "http://example.com/index.php",
"providers" => array (
// openid providers
"OpenID" => array (
"enabled" => false
),
"AOL" => array (
"enabled" => false
),
"Yahoo" => array (
"enabled" => false,
"keys" => array ( "id" => "", "secret" => "" )
),
"Google" => array (
"enabled" => true,
"keys" => array ( "id" => "", "secret" => "" )
),
"Facebook" => array (
"enabled" => true,
"keys" => array ( "id" => "xxxxxxxxx", "secret" => "xxxxxxx" )
),
"Twitter" => array (
"enabled" => true,
"keys" => array ( "key" => "xxxxxxxx", "secret" => "xxxxxxxx" )
),
// windows live
"Live" => array (
"enabled" => false,
"keys" => array ( "id" => "", "secret" => "" )
),
"MySpace" => array (
"enabled" => false,
"keys" => array ( "key" => "", "secret" => "" )
),
"LinkedIn" => array (
"enabled" => true,
"keys" => array ( "key" => "xxxxxxxx", "secret" => "xxxxxxx" )
),
"Foursquare" => array (
"enabled" => false,
"keys" => array ( "id" => "", "secret" => "" )
),
),
// if you want to enable logging, set 'debug_mode' to true then provide a writable file by the web server on "debug_file"
"debug_mode" => false,
"debug_file" => ""
);
有人可以帮我吗?我有一种感觉,在搜索互联网很长时间后,它根本不能很好地工作。如果是这样的话,有人能指出一个更好的替代开源/免费社交登录库吗?