title: too much recursion - jquery - why?
body: <p>I am struggling with this issue for a couple of hours, but no sign of success. I am trying to implement the facebook login. this is my code: </p>
  
  <pre><code>function fblogin() {
   FB.login(function(response) {
      if (response.authResponse) {
          var url = '/me?fields=name,email';
          FB.api(url, function(response) {
              $('#email_login').val(response.email);
              $('#pwd_login').val(response.name);
              $('#sess_id').val(response.id);
              if($('#evil_username').val()==""){
                  $('#loginform').submit();
              }else{
               // doh you are bot
              }
          });
      } else {
          // cancelled
       }
    }, {scope:'email'});
   }
  </code></pre>
  
  <p>but once i click facebook login button, i am getting <code>too much recursion</code> in console. why is that? i read lots of problems here in stackoverflow regarding this issue, but couldnot find the clue for my case. </p>
  
  <p>i dont have recursion here, but what is happening which causes that recursion? </p>
  
  <p>and there is a call for it from  </p>
  
  <pre><code>window.fbAsyncInit = function() {
  FB.init({
    appId      : 'xxxxxxxxxxxxx', 
    channelUrl : '//www.mydomain.de/channel.html', 
    status     : true, 
    cookie     : true, 
    xfbml      : true  
  });
  // Additional init code here
  FB.getLoginStatus(function(response) {
  if (response.status === 'connected') {
        // connected
  } else if (response.status === 'not_authorized') {
        // not_authorized
        fblogin();
  } else {
        // not_logged_in
        fblogin();
  }
  });
  };
  </code></pre>
  
  <p>and also from normal <code>LOGIN</code> button which triggers the <code>fblogin()</code>. </p>