You need to start a session using session_start()
for the Facebook SDK to work correctly. Please add this to your code to fix the issue.
Example:
<?php
session_start();
require 'vendor/autoload.php';
use Facebook\FacebookSession;
use Facebook\FacebookRedirectLoginHelper;
...