Hello I'm working with a PHP code using Facebook SDK to post a message on a facbook page which I am the admin it's ok when I work in localhost but when I hosted my page on a web server it gives me the following error:
Fatal error: Class 'Facebook\FacebookSession' not found in /var/www/simo/index.php on line 48
The lines of code that cause problem:
use Facebook\FacebookRedirectLoginHelper;
use Facebook\FacebookSession;
use Facebook\FacebookRequest;
require "vendor/autoload.php";
session_start();
$appId='358738637667835';
$appSecret='92841aa4b36c9c37a4d779e801db3d6f';
FacebookSession::setDefaultApplication($appId,$appSecret);//(line 48)
The thing that should be noted is that the version of my server’s PHP is “PHP 5.4.39” that normally understands the instruction "use".
Thank you for giving me a solution or a suggestion.