views:

54

answers:

0

I am following this tutoril. Though the user is logged in into facebook, but the session is showing him not logged in(NULL session). Please someone help me out. My code-segment is as follows-

$facebook = new Facebook(
                    array(
                    'appId'  => $app_config['app_id'],
                    'secret' => $app_config['app_secret'],
                    'cookie' => true,)
                );

$session = $facebook->getSession();
var_dump($session);
$fbme = null;
if ($session) {
    try {
        $uid = $facebook->getUser();
        $fbme = $facebook->api('/me');
    } catch (FacebookApiException $e) {
        error_log($e);
    }
}

related questions