I don't know which tutorial you followed but that's the incorrect way of creating a Facebook
object.
Replace your starting code with-
include_once 'facebook-php-sdk-master/src/facebook.php';
$config = array(
'appId' => 'YOUR_APP_ID',
'secret' => 'YOUR_APP_SECRET',
'allowSignedRequest' => false // optional but should be set to false for non-canvas apps
);
$facebook = new Facebook($config);
$user = $facebook->getUser();
You must follow the official documentation of using the PHP SDK.