I am building a Facebook app using iframe rendering. I want to use CodeIgniter for the back end and am wondering what all the settings should be set to for CodeIgniter and Facebook to get along. Specific settings I am wondering about are:
- Facebook's canvas callback url (should it include the default controller and function)?
- config.php's base_url, index_page, uri_protocol, enable_query_strings
- Anything else I might be missing
How I have the Facebook interaction set up currently is creating a new controller FB_Controller that is added to the libraries folder that every one of my controllers inherit from. FB_Controller inherits from Controller and has a property $facebook that is instantiated using the API key and secret upon construction. Not sure if this the best approach.
I am also using mod_rewrite to get rid of index.php and just so there's no confusion here's the code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>