I'm having a problem simply loading the Facebook PHP SDK (v3.1.1) as library in CodeIgniter 2.0.
1) I've put the latest Facebook SDK files ('facebook.php', 'base_facebook.php', and 'fb_ca_chain_bundle.crt' ) into my application/libraries folder.
2) I've changed the filename of 'facebook.php' to 'Facebook.php'.
3) In my controller, I have the following code:
$fb_config = array(
'appId' => 'XXXXXXX',
'secret' => 'XXXXXXX'
);
$this->load->library('facebook', $fb_config);
$this->load->view('home_view');
But I just get an error and the View does not get loaded.
If I comment out the line
$this->load->library('facebook', $fb_config);
then the View loads correctly, so I know the problem is here.
4) If I try to autoload the facebook library, I get similar results.
Can anyone help? Thanks.