too much recursion - jquery - why?

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: 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'}); } but once i click facebook login button, i am getting ``too much recursion`` in console. why is that? i read lots of problems here in stackoverflow regarding this issue, but couldnot find the clue for my case. i dont have recursion here, but what is happening which causes that recursion? and there is a call for it from 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(); } }); }; and also from normal `LOGIN` button which triggers the `fblogin()`.
How are you calling this?

以上就是too much recursion - jquery - why?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏