php - Facebook API's require_login to work with CodeIgniter -


If I currently use facebook's need_login, it seems that linking the URL is going to the infinite loop . All of my controllers are from an FB_Controller who is on the build:

  $ this-> Facebook = new facebook ($ this-> API_KEY, $ secret); $ This- & gt; UID = $ this- & gt; Facebook-> Need_login (); // Infinite loop causes!  

I had to explicitly set a canvas callback URL on Facebook (where is my desired default controller to ask) or I get a 404 error. Apart from this, I am using the iframe rendering method.

On CodeIgniter, I have specific mod_rewrite to get rid of index.php, $ config ['uri_protocol'] = "REQUEST_URI", $ config ['enable_query_strings'] = true the following two configurations There was a simple link to get to work (clicking on a link will not work as it would only navigate to the current page).

I have set the user_protocol only on request_url or path_info, depending on the referrer header. So in config.php I have:

  $ config ['uri_protocol'] = (issued ($ _ server ['HTTP_REFERER']) and strokes ($ _ server ['HTTP_REFERER'] , 'Apps.facebook.com')! == incorrect)? "Pathhimpho": "REQUEST_URI";  

Most beautiful I do not believe but it works.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -