too long

I used following code to check user is logged in or not in FB and then redirect accordingly to my website pages.

include_once "./fbsrc/facebook.php";

$facebook = new Facebook(array(
  'appId'  => $fbconfig['appid'],
  'secret' => $fbconfig['secret'],
  'cookie' => true,
));

$uid = $facebook->getUser();

I placed above code to one file. Now I used this file to get id of user if I get id then I redirect user to page1.php and if not to page2.php as following

include "fbmain.php";

if(isset($uid) && !empty($uid))
{
    //redirect to page1.php  
}
else
{
    //redirect to page2.php
}

This code works fine in google chrome but it give problem in mozilla. In mozilla everytime user is redirect to page2.php even user is logged in FB as $uid is not set. I get int(0) when var_dump($uid). What's wrong with code. Please help me.

Thanks...

Do you have cookies disabled in Firefox?