This is driving me crazy >=(
$facebook->getUser() works well sometimes, but sometimes returns 0
Here is my code:
require \'fbapi/facebook.php\';
$
I found a simple solution to this problem.. this happens when facebook class is not able to set or add session variable on your server..
In my code i used session_write_close() before including facebook classes because of which i got this error.. "CSRF state token does not match one provided."..
I then moved session_write_close() at the end of the code and finally it worked.. :)