redirect_uri URL必须是绝对的(使用localhost中的php登录Facebook)


The redirect_uri URL must be absolute (Facebook login using php in localhost)

这是我的config.php如何将其从localhost重定向到facebook?因为localhost没有"http://"?

当我想登录并按下按钮时。它说"重定向URL必须是绝对的"

<?php
/*!
* HybridAuth
* http://hybridauth.sourceforge.net | http://github.com/hybridauth/hybridauth
* (c) 2009-2012, HybridAuth authors | http://hybridauth.sourceforge.net/licenses.html
*/
// ----------------------------------------------------------------------------------------
//  HybridAuth Config file: http://hybridauth.sourceforge.net/userguide/Configuration.html
// ----------------------------------------------------------------------------------------
$config =array(
        "base_url" => "hybridauth/index.php", 
        "providers" => array ( 
            "Google" => array ( 
                "enabled" => true,
                "keys"    => array ( "id" => "XXXXXXXXXXXX", "secret" => "XXXXXXXX" ), 
            ),
            "Facebook" => array ( 
                "enabled" => true,
                "keys"    => array ( "id" => "XXXXXXXXXXXX", "secret" => "XXXXXXXXXXXX" ), 
            ),
        "Twitter" => array ( 
            "enabled" => true,
            "keys"    => array ( "key" => "XXXXXXXX", "secret" => "XXXXXXX" ) 
        ),
    ),
    // 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" => "debug.log",
);

localhosthttp://localhost相同。

这应该有助于

"base_url" => "http://localhost/hybridauth/index.php"