Facebook SDK PHP - 在此脚本上出错[复制]

This question already has an answer here:

Not sure what the problem is here..

<?php require_once 'Facebook/autoload.php'; 

session_start()

$fb = new Facebook\Facebook([
  'app_id' => 'xxxx',
  'app_secret' => 'xxxx',
  'default_graph_version' => 'v2.5',
]);

$helper = $fb->getRedirectLoginHelper();
$permissions = ['email', 'name', 'user_id']; // optional
$loginUrl = $helper->getLoginUrl('http://www.website.co.uk/index.php', $permissions);

echo '<a href="' . $loginUrl . '">Log in with Facebook!</a>';

?>

I get an error :

Parse error: syntax error, unexpected '$fb' (T_VARIABLE) in /homepages/4/d570601812/htdocs/daf/inc/head.php on line 5"

</div>

You forgot about semicolon.

Change session_start() to session_start(); on the second line of your code.