Answer the question
In order to leave comments, you need to log in
Check JS session on server?
The question is simple, but Google did not cope.
There is a JS Api function: FB.login(callback...);
Callback receives info like:
response = {<br/>
authResponse = {<br/>
accessToken = "...много_букв...",<br/>
expiresIn = 4734,<br/>
signedRequest = "...много_букв..."<br/>
userID = "100001415486037"<br/>
}, <br/>
status = "connected"<br/>
}
Answer the question
In order to leave comments, you need to log in
Facebook has its own API for php.
Work with it like this:
require_once 'facebook.php';
$facebook = new Facebook(array(/* здесь конфиги для FB */));
$user = $facebook->getUser();
if ($user) {
try {
$userProfile = $facebook->api('/me');
// ... что-то еще
} catch (FacebookApiException $e) {
// как-то обработать ошибку от FB
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question