Welcome Guest, Not a member yet? Register   Sign In
Loading Facebook SDK as a library doesn't work [SOLVED]
#1

[eluser]CoderReborn[/eluser]
I've put the latest Facebook SDK files ('facebook.php', 'base_facebook.php', and 'fb_ca_chain_bundle.crt' ) into my application/libraries folder. I've changed the filename of 'facebook.php' to 'Facebook.php'.

In my controller, I have the following code:
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 try to autoload the facebook library, I get similar results.


Can anyone help? Thanks.
#2

[eluser]CoderReborn[/eluser]
I figured out the problem.

I was missing the PHP cURL extension, so the code aborted in the "base_facebook.php" file when it check if
I had cURL installed.




Theme © iAndrew 2016 - Forum software by © MyBB