CodeIgniter v.2.1.4, Custom Themes (Bootstrap v.3.1.0) & Facebook Integration (PHP SDK v.3.2.3).
- Upload files
- Define database settings in /application/config/database.php
- Define Facebook settings in /application/config/facebook.php
- Go!
- Theme assets are located in the /assets/ folder. Main theme files are located in the /application/views/themes/ folder.
- If there's an update of the Facebook PHP SDK available, just replace 'facebook.php' and 'base_facebook.php' in /application/third_party/facebook/libraries/.
// Load Facebook PHP SDK
$this->load->library('facebook_init');
// Access the Facebook PHP SDK
$data['loginUrl'] = $this->facebook->getLoginUrl(array('scope'=>'email'));
// Set the main template for this page
$this->output->set_template('default');
// Load the template assets for this page
$this->load->js('https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js');
$this->load->css('https://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css');
See for an example the Home controller /application/controllers/home.php
Build upon CodeIgniter-Simplicity by John Skoumbourdis and the official Facebook PHP SDK.