Reputation: 14757
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:
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>
Upvotes: 1
Views: 3260
Reputation: 7433
You shouldn't have to do anything special to get Facebook to work with your CodeIgniter application.
Like you, I don't like having index.php in the URLs of my CodeIgniter apps so I remove them by enabling mod_rewrite for Apache and adding a .htaccess file to the root directory of my project with the following :
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
Upvotes: 1
Reputation: 5313
I'm only use facebook connect in my application, to auto-login visitor that have connect their account with a facebook account.
I use facebook connect library in my application. This library is created by Elliot Haughin. Check it out, maybe it's can give you a start of creating your own library.
Upvotes: 1