document.addEventListener('deviceready', function() {
try {
FB.init({
appId : "*********",
nativeInterface : CDV.FB,
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
useCachedDialogs : true
});
} catch (error) {
console.log(error);
}
}, false);
即使我尝试在调试中运行此代码,我也会收到警告“错误!”