我正在使用AngularJS for Facebook(从Ciul/angular-facebook自定义)并下载Facebook's Javascript SDK的完整调试版本并将其存储在我的服务器上:
facebooksdk.js
它在我可以告诉的每个方面都运行良好,但在我的Chrome控制台中,它显示以下错误消息:
Error: method missing
Error
at Object.<anonymous> (/facebooksdk.js:1774:26)
at window.FB.__w.signature (/facebooksdk.js:447:20)
at window.FB.__w.signature (/facebooksdk.js:443:46)
at window.FB.__w.signature (/facebooksdk.js:443:46)
at window.FB.__w.signature (/facebooksdk.js:443:46)
at window.FB.__w.signature (/facebooksdk.js:443:46)
at window.FB.__w.signature (/facebooksdk.js:443:46)
at window.FB.__w.signature (/facebooksdk.js:443:46)
at window.FB.__w.signature (/facebooksdk.js:443:46)
at window.FB.__w.signature (/facebooksdk.js:443:46) angular.js:5601
(anonymous function) angular.js:5601
(anonymous function) angular.js:4698
wrappedCallback angular.js:6695
(anonymous function) angular.js:6730
Scope.$eval angular.js:7905
Scope.$digest angular.js:7770
Scope.$apply angular.js:7991
(anonymous function) facebook.js:176
Scope.$broadcast angular.js:8155
$window.fbAsyncInit facebook.js:273
func.__wrapper facebooksdk.js:5608
(anonymous function)
facebooksdk.js:1774就是这个:
__d("ManagedError",[],function(global,require,requireDynamic,requireLazy,module,exports) {
function ManagedError(message, innerError) {
Error.prototype.constructor.call(this, message);
this.message = message;
this.innerError = innerError;
}
ManagedError.prototype = new Error(); //////// <---------- line 1774
ManagedError.prototype.constructor = ManagedError;
module.exports = ManagedError;
});
facebooksdk.js:447就是这样:
for (var i = 0; i < length; i++) {
switch(deps[i]) {
case 'module' : dep = module; break;
case 'exports' : dep = module.exports; break;
case 'global' : dep = global; break;
case 'require' : dep = require; break;
case 'requireDynamic': dep = require; break;
case 'requireLazy' : dep = null; break;
default : dep = require.call(null, deps[i]); ///// <---- line 443
}
args.push(dep);
}
module.factory.apply(global, args); //////// <-------- line 447
resolved[id] = module.exports;
return module.exports;
任何人都可以建议如何摆脱这种“方法缺失”错误。谢谢!