Answer the question
In order to leave comments, you need to log in
What is this $session in Facebook Api?
The facebook api documentation says how to make a request
$request = new FacebookRequest(
$session,
'GET',
'/{user-id-a}/friends/{user-id-b}'
);
Answer the question
In order to leave comments, you need to log in
https://developers.facebook.com/docs/php/FacebookS...
use Facebook\FacebookSession;
FacebookSession::setDefaultApplication('app-id', 'app-secret');
// If you already have a valid access token:
$session = new FacebookSession('access-token');
// If you're making app-level requests:
$session = FacebookSession::newAppSession();
// To validate the session:
try {
$session->validate();
} catch (FacebookRequestException $ex) {
// Session not valid, Graph API returned an exception with the reason.
echo $ex->getMessage();
} catch (\Exception $ex) {
// Graph API returned info, but it may mismatch the current app or have expired.
echo $ex->getMessage();
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question