I am new to community, sorry for misleading. As Ashley said and zenox98 warned again, i strongly recommend to not make this change unless you are doing this just for fun as i do... Also maybe Ashley can check if this fix is worth to do it or not..
Before calling onFBLogin() you look for fbUserID.. On cases which user close browser and re-open again somehow session is still alive but you are not authorized by facebook api.. On this cases you will get response.authResponse is null error.. To avoid this error you can try to modify runtime.js as below (starting line 114)..
I am still using the free edition, maybe personal editions dont have this issue..
FB.Event.subscribe('auth.login', function(response) {
if(response["authResponse"]){ // Check if response.authResponse exists
fbUserID = response["authResponse"]["userID"];
log("User ID = " + fbUserID);
onFBLogin();
} // close if
});
[/code:q0faifuw]