I am using yii framework and want to know the login status of facebook user. I am using $_REQUEST["code"] to get the user login status, but am facing some problem. I want to know if I can check session for it or get logged in status some other way..??
I used php sdk and below are the codes:
$facebook = new Facebook(…);
$session = $facebook->getSession();
if ($session) {
// proceed knowing you have a valid user session
} else {
// proceed knowing you require user login and/or authentication
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.