I'm having an issue migrating this particular snippet
// previously
$facebook = new Facebook(array(
'appId' => 'xxx',
'secret' => 'xxx',
));
$accessToken = $facebook->getApplicationAccessToken();
$facebook->setAccessToken($accessToken);
$facebook->api($url, 'POST');
// v4.0
$session = Facebook\FacebookSession::newAppSession('xxx','xxx');
$response = (new Facebook\FacebookRequest(
$session, 'POST', $url
))->execute();
And this is giving:
Uncaught exception 'Facebook\FacebookAuthorizationException' with message '(#803) Some of the aliases you requested do not exist: v2.0557210865'
$url should be /557210865
and not 557210865
.