在visual studio 2015中当我尝试运行示例sales-force contactexplorer应用程序时,我收到以下错误:
这是我的方法:
function onDeviceReady() {
cordova.require("com.salesforce.util.logger").logToConsole("onDeviceReady:Cordova ready");
//Call getAuthCredentials to get the initial session credentials
cordova.require("com.salesforce.plugin.oauth").getAuthCredentials(salesforceSessionRefreshed, getAuthCredentialsError);
//register to receive notifications when autoRefreshOnForeground refreshes the sfdc session
document.addEventListener("salesforceSessionRefresh",salesforceSessionRefreshed,false);
//enable buttons
regLinkClickHandlers();
}
这是我的输出:
jslog:onDeviceReady:Cordova ready
缺少exec:com.salesforce.oauth.getAuthCredentials
TypeError:无法读取属性' getAuthCredentials'未定义的(...) TypeError:无法读取属性' getAuthCredentials'未定义的 在module.exports.exec 在exec(com.salesforce.util.exec.js:34) at Object.getAuthCredentials(com.salesforce.plugin.oauth.js:56) at onDeviceReady(index.html:64) 在Channel.fire(cordova.js:820) 在cordova.js:229 com.salesforce.oauth getAuthCredentials