This is driving me crazy >=(
$facebook->getUser() works well sometimes, but sometimes returns 0
Here is my code:
require \'fbapi/facebook.php\';
$
It's more than likely something on Facebook's end (devs have gone through this before a while back). If $user returns null or 0, simply reroute them to the login url (which you should have). The liklihood of it returning 0 again is minimal (unless there's a bug on their end or there's more to your code than what you've posted).