Authentication with Facebook (PHP SDK) and Codeigniter Authentication with Facebook (PHP SDK) and Codeigniter codeigniter codeigniter

Authentication with Facebook (PHP SDK) and Codeigniter


I had the same problem and my hack to it was that I added the config array to the constructor of the facebook class instead of passing it as a parameter to the constructor. For some reason the config array wasn't being passed or read.

so my hack looks as follows:

    public function __construct() {    if (!session_id()) {        session_start();    }    $config = array(        'appId' => FACEBOOK_APP_ID,        'secret' => FACEBOOK_SECRET    );    parent::__construct($config);}

Hope this helps.


I've been working with the Facebook SDK on CodeIgniter a while now, and decided to release my code as an open source extension.There's one thing: this code uses the SDK as a library, and has built a model on top of it, having multiple other awesome functions ready to be used.

In case you'd like to use it, or contribute in any way (issues, commits, etc), feel free to join:

https://github.com/AlphabaseIT/CIconnect