I\'m trying to get the minimal example
using Facebook\\FacebookSession;
FacebookSession::setDefaultApplication(\'YOUR_APP_ID\',\'YOUR_APP_SECRET\');
// Use
I solved it. Just use following line at the top of your script:
define('FACEBOOK_SDK_V4_SRC_DIR', __DIR__ . '/facebook-php-sdk-v4/src/Facebook/');
and you are done.
I think you need to change this line:
using Facebook\FacebookSession;
to
use Facebook\FacebookSession;
to use a namespace in php the keyword is use
more on php using namespaces
Update:
using namespaces does not automatically include the script, you either need to include the path in your autoload (if you have one) or simply:
include 'path/to/FacebookSession.php';
Update2: first, please read the php namespaces in the manual, second, no, if it is already included in the original class then you don't. or if it is adhering to psr-* then you can use some autoloader or use spl_autoload_register