我试图让 HybridAuth 社交登录在这个简单的 php 网站上工作。下载并安装了 HybridAuth。然后发现即使是示例也不适用于社交登录(也在远程服务器上尝试过。
正常的 signin_signup 示例工作正常。但是,每当我单击链接登录到社交网络(即 facebook、twitter)时,它都会将我重定向到 (MY_BASE_URL/index.php?hauth.start=Facebook&hauth.time),而根本不会显示任何登录窗口/错误消息。
我已经仔细阅读了此处发布的文档和其他解决方案。将我的 config.php 调整为具有类似http://example.com/index.php的基本网址。但它只是没有回应。有什么我想念的吗?我已经花了2天时间。
这是我的 config.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" => ""
);
有人可以帮帮我吗?在网上搜索了很长时间后,我感觉它根本不起作用。如果是这样,有人可以指出更好的替代开源/免费社交登录库吗?