Asked 7 years ago
17 Apr 2017
Views 1539

posted

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in php


include("includes/facebook/facebook.php");
$fb = new \Facebook\Facebook([
  'app_id' => '{app-id}',
  'app_secret' => '{app-secret}',
  'default_graph_version' => 'v2.8',
  //'default_access_token' => '{access-token}', // optional
]);


i got error
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in php
Mitul Dabhi

Mitul Dabhi
answered Nov 30 '-1 00:00

its only because use of namespace .
namespace is only supported >= PHP version 5.3.0 .OR PHP Version 7.0
so may be your PHP version is less than of 5.3.0 so upgarde it to PHP Version 5.3.0
Post Answer