I created a shell class for the SDK in the extensions /FacebookUtility.php
require_once __DIR__ . '/../facebook-php-sdk/src/facebook.php';
class FacebookUtility extends CApplicationComponent
{
public $apiKey;
public $secretKey;
:
:
public function connect() { ... }
}
Then, in my main.php, under the components
'facebook'=>array(
'class' =>'FacebookUtility',
'apiKey' =>'yourapikey',
'secretKey' =>'your secret key',
),
Then during my login.
$objFacebook = Yii::app()->getComponent('facebook');
$objFacebook->connect();
source
share