Issue
I am updating my app to use the Facebook v4 php sdk and am having issues installing it via composer in codeigniter.
I have been using composer with codeigniter without an issue for some time and am loading my autoload file in my index.php.
When running the code I keep getting the following error
Fatal error: Class 'Facebook\FacebookSession' not found in /var/www/dev/application/controllers/playground.php on line 12
Here is my Controller
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
use Facebook\FacebookSession;
use Facebook\FacebookRequest;
use Facebook\GraphUser;
use Facebook\FacebookRequestException;
class Playground extends MY_Controller {
public function index() {
FacebookSession::setDefaultApplication('-removed-','-removed-');
}
}
I have no idea why...
Solution
Figured it out and it was my own mistake
The facebook documentation correctly tells you to use the following
"facebook/php-sdk-v4": "4.0.*"
The latest composer package on packagist leads you to download the following
"facebook/php-sdk-v4": "4.1.*@dev"
Answered By - bertmaclin
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.