Facebook Login Though Authenticating but returns NULL
===

I am trying to login with facebook on my site. As I have got with login that When I click to button I created it authenticate me with the login, it also returned to my page with state, code, extra params but my issue is. When I try to get 

     $user = $facebook->getUser();
It returns NULL..How would I return value. I am using Latest SDK of Facebook. `getUSer` method is written in base_facebook.php. Not In facebook.php I have created instance for facebook.php file.

    App::import('Vendor', 'facebook');
    $facebook = new Facebook(array(
        'appId' => FACEBOOK_APP_ID,
        'secret' => FACEBOOK_SECRET,
        'cookie' => true
    ));
    $user = $facebook->getUser();
    pr($user); // 0
    pr($facebook); exit; //  
    
    Facebook Object
    (
        [appId:protected] => 504660599560848
        [appSecret:protected] => 6480acfc9907d206a4087677561b0ac2
        [user:protected] => 0
        [signedRequest:protected] => 
        [state:protected] => 6bc47afae3be53769b82ca9693717efb
        [accessToken:protected] => 504660599560848|6480acfc9907d206a4087677561b0ac2
        [fileUploadSupport:protected] => 
    )

How would I get access token and all rest of data...Like name first name and rest of details. What are variables that are returned from fb.


I am trying all these on localserver. Have mentioned canvas URL in app

