hostgator.com に共有 ssl を持つホストがあり、codeIgniter サイトを public_html(root) ディレクトリにアップロードしました。ウェブサイトと Facebook アプリケーションを開発したいと考えています。Facebook アプリの実行中に「Facebook でログイン」を使用して Web サイトを正常に実行すると、URL リダイレクト エラーが発生します。
これはhttpのURLです
url(Website): http://example.org/
安全なURLは
https://in9.hostgator.in/~username/
Facebookアプリの設定で、
canvas url : http://example.org/
Secure Canvas URL : https://in9.hostgator.in/~username/ (Work in url)
Facebook アプリケーションを実行すると、Facebook でエラーが発生します。
API Error Code: 191
API Error Description: The specified URL is not owned by the application
Error Message: Invalid redirect_uri: Given URL is not permitted by the application configuration.
アプリケーションには、ルート ディレクトリにある index.php をリダイレクトまたは削除するための .htaccess ファイルがありません。
この基本コントローラーコードを実行しました:
public function __construct()
{
parent::__construct();
$this->load->library("session");
$this->load->helper('cookie');
parse_str( $_SERVER['QUERY_STRING'], $_REQUEST );
$CI = & get_instance();
$CI->config->load("facebook",TRUE);
$config = $CI->config->item('facebook');
$this->load->library('Facebook', $config);
}
/**
* Index function
* @access public
*
public function index()
{
$userId = $this->facebook->getUser();
// If user is not yet authenticated, the id will be zero
if($userId == 0){
// Generate a login url
$params = array(
'scope' => 'email,user_about_me, user_birthday, user_location');
$url = $this->facebook->getLoginUrl($params);
echo "<script type='text/javascript'>" . "top.location.href = '" . $url. "';</script>";
}
}
'$url' を出力すると、クエリ文字列の redirect_url は ' http://in9.hostgator.in/~username/ ' になり、https パスにリダイレクトされません。
私は混乱しています、コードの間違いは何ですか? またはサーバーの設定が間違っているか、それとも何ですか?