Note that there are some explanatory texts on larger screens.

plurals
  1. POFacebook APP with Shared SSL in codeIgniter
    text
    copied!<p>I have a host with shared ssl in hostgator.com, I uploaded codeIgniter site in public_html(root) directory. I want to develop a website as well as facebook application. website run successful with 'login with facebook' while running a facebook app, it gives an url redirect error.</p> <p>This is http url</p> <pre><code> url(Website): http://example.org/ </code></pre> <p>and secure url is </p> <pre><code> https://in9.hostgator.in/~username/ </code></pre> <p>In facebook app configuration,</p> <pre><code> canvas url : http://example.org/ Secure Canvas URL : https://in9.hostgator.in/~username/ (Work in url) </code></pre> <p>When i have run facebook application, facebook gives an error :</p> <pre><code> 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. </code></pre> <p>In application, there is no .htaccess file for redirecting or removing index.php in root directory.</p> <p>I have run this base controller code :</p> <pre><code> public function __construct() { parent::__construct(); $this-&gt;load-&gt;library("session"); $this-&gt;load-&gt;helper('cookie'); parse_str( $_SERVER['QUERY_STRING'], $_REQUEST ); $CI = &amp; get_instance(); $CI-&gt;config-&gt;load("facebook",TRUE); $config = $CI-&gt;config-&gt;item('facebook'); $this-&gt;load-&gt;library('Facebook', $config); } /** * Index function * @access public * public function index() { $userId = $this-&gt;facebook-&gt;getUser(); // If user is not yet authenticated, the id will be zero if($userId == 0){ // Generate a login url $params = array( 'scope' =&gt; 'email,user_about_me, user_birthday, user_location'); $url = $this-&gt;facebook-&gt;getLoginUrl($params); echo "&lt;script type='text/javascript'&gt;" . "top.location.href = '" . $url. "';&lt;/script&gt;"; } } </code></pre> <p>When i print '$url' then redirect_url in query string is '<a href="http://in9.hostgator.in/~username/" rel="nofollow noreferrer">http://in9.hostgator.in/~username/</a>', not redirect to https path.</p> <p>I am confused, what is a mistake in code? or some wrong configuration in server or what?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload