i\'m trying to get Facebook user id using the php sdk like this
$fb = new Facebook\\Facebook([ \'app_id\' => \'11111111111\', \'app_secret\' =>
For me, the problem was that I wasn't running a session before the script.
So, I added session_start(); before instantiating the Facebook class.
session_start();
Facebook