redirect_uri网址必须是绝对的(Facebook在本地主机上使用php登录)
问题描述:
这是我的config.php 如何将其重定向到本地主机的Facebook?由于本地主机没有“http://”?redirect_uri网址必须是绝对的(Facebook在本地主机上使用php登录)
当我想登录并按下按钮。它表示: “REDIRECT_URI 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",
);
答
localhost
是一样http://localhost
。
这应该有助于
"base_url" => "http://localhost/hybridauth/index.php"
它的工作! ,但仍然有错误 “应用程序配置不允许提供URL:应用程序设置不允许指定一个或多个URL,该URL必须与网站的URL或Canvas URL匹配,或球体必须是来自此应用程序的一个领域的uparanah(子域)。“ – 2015-03-02 15:35:16
那么,然后,在您的应用程序设置中添加localhost作为网站平台。意思是,只要做错误信息就可以了。 – luschn 2015-03-02 15:38:03
好吧,谢谢:D 它再次运作 – 2015-03-02 15:46:15