I'm trying to validate Facebook App ID and App Secret. With Graph Explorer, I'm able to use access token in shape of {APP_ID}|{APP_SECRET} to get app details on /v2.5/{APP_ID} endpoint.
It doesn't work with PHP SDK though. The error I'm getting is:
Unknown path components: /{APP_ID}
The code I used is this:
$facebook = new Facebook\Facebook( [
'app_id' => $app_id,
'app_secret' => $app_secret,
'default_graph_version' => '2.5',
] );
$facebook->get( '/' . $app_id, $app_id . '|' . $app_secret );
It does the validation, because with invalid app ID I'm getting:
Error validating application. Cannot get application info due to a system error.
And with invalid secret:
Invalid OAuth access token signature.
How can I get the app details just like in graph explorer? I have no idea what I'm doing wrong, the request seems to be correct. Please help.