网站

时间:2015-05-27 13:22:24

标签: facebook facebook-sdk-3.0

我在网站上登录facebook时收到错误。

我收到此错误:sdk.ErrorHandling

当我删除登录功能时它工作得很好,我认为我在登录功能方面有一些问题。

任何人都可以帮我写一下如何写facebook的登录功能

这是我的代码:

function login() {
        oldToken = FB.getAccessToken();
        FB.login(function (response) {
            if (response.authResponse && response.authResponse.accessToken != oldToken) {
            if (fbdone == false) {
                GetUserData();
                fbdone = true;
            }
            }
        }, {
            auth_type: 'reauthenticate', scope: 'email,user_friends,public_profile'
        });

我正在犯这个错误

sdk.ErrorHandling",["ManagedError","sdk.Runtime","sdk.Scribe","sdk.UA","sdk.feature","wrapFunction"],function(a,b,c,d,e,f,g,h,i,j,k,l){b.__markCompiled&&b.__markCompiled();var m=k('error_handling',false),n='';function o(u){var v=u._originalError;delete u._originalError;i.log('jssdk_error',{appId:h.getClientID(),error:u.name||u.message,extra:u});throw v;}function p(u){var v={line:u.lineNumber||u.line,message:u.message,name:u.name,script:u.fileName||u.sourceURL||u.script,stack:u.stackTrace||u.stack};v._originalError=u;if(j.chrome()&&/([\w:\.\/]+\.js):(\d+)/.test(u.stack)){v.script=RegExp.$1;v.line=parseInt(RegExp.$2,10);}for(var w in v)(v[w]==null&&delete v[w]);return v;}function q(u,v){return function(){if(!m)return u.apply(this,arguments);try{n=v;return u.apply(this,arguments);}catch(w){if(w instanceof g)throw w;var x=p(w);x.entry=v;var y=ES(Array.prototype.slice.call(arguments),'map',true,function(z){var aa=Object.prototype.toString.call(z);return (/^\[object (String|Number|Boolean|Object|Date)\]$/).test(aa)?z:z.toString();});x.args=ES('JSON','stringify',false,y).substring(0,200);o(x);}finally{n='';}};}function r(u){if(!u.__wrapper)u.__wrapper=function(){try{return u.apply(this,arguments);}catch(v){window.setTimeout(function(){throw v;},0);return false;}};return u.__wrapper;}function s(u,v){return function(w,x){var y=v+':'+(n||'[global]')+':'+(w.name||'[anonymous]'+(arguments.callee.caller.name?'('+arguments.callee.caller.name+')':''));return u(l(w,'entry',y),x);};}if(m){setTimeout=s(setTimeout,'setTimeout');setInterval=s(setInterval,'setInterval');l.setWrapper(q,'entry');}var t={guard:q,unguard:r};e.exports=t;},null);

0 个答案:

没有答案