2

我正在开发一个简单的 PHP 站点并尝试在其中集成社交登录。所以我使用了 Hybridauth库。要通过 Windows Live 帐户登录,我在这里创建了一个新应用程序。在重定向 URL 中,我输入了完整的域名,例如http://mydomain.com,因为 Live 在其重定向 URL 中不接受查询字符串

这是我的 config.php

array(
    "base_url" => "http://" . $_SERVER['HTTP_HOST'] . $this->base . "/hybridauth/", 

    "providers" => array ( 

        // windows live
        "Live" => array ( 
            "enabled" => false,
            "keys"    => array ( "id" => "xxxxxxxxx", "secret" => "xxxxxxxxx" ) 
        ), 
    ),

    "debug_mode" => false,

    "debug_file" => ""
);

当我点击登录链接

<a href="loginwith/live" class="zocial live">Login with Windows Live</a>

我被定向到链接

https://login.live.com/err.srf?lc=1066#error=invalid_request&error_description=The%20provided%20value%20for%20the%20input%20parameter%20'redirect_uri'%20is%20not%20valid.%20The% 20expected%20value%20is%20'https://login.live.com/oauth20_desktop.srf'%20or%20a%20URL%20which%20matches%20the%20redirect%20URI%20registered%20for%20this%20client%20application。

带有错误消息“我们无法完成您的请求 Microsoft 帐户遇到技术问题。请稍后再试。”

我尝试更改重定向 URL,但结果相同。有人可以解决这个问题吗?

提前非常感谢!

4

1 回答 1

0

尝试这个:

"enabled" => true,
于 2015-10-01T03:31:05.813 回答