I have need your help about Facebook SDK with PHP in Yii Framework. But when I put all file in php-sdk which download from developer.facebook.com into portected/vendor and config in config/main.php. In file I use code:
require_once (Yii::app()->basePath . '/vendors/facebook-php-sdk/autoload.php');
use Facebook\FacebookSession; use Facebook\FacebookRequest; use Facebook\GraphUser; use Facebook\FacebookRequestException; use Facebook\FacebookRedirectLoginHelper;
But when I use: FacebookSession::setDefaultApplication(api_key,api_secret);
It shown me an error:
Class Facebook FacebookSession not found in......
Can you help me about this error.Thank all.
Maybe you try this :
just only use "./facebook-php-sdk-v4/autoload.php" in your project