我正在尝试使用Skype SDK安排会议。我给出的代码与示例中所示的相同。但是我没有收到任何错误或代码来安排会议。请仔细检查代码,如果下面的代码有任何错误,请通知我。我被困住了
$('#authentication').click(function() {
var client_id = "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxx";
window.sessionStorage.setItem('client_id', client_id);
var href = 'https://login.microsoftonline.com/common/oauth2/authorize?response_type=token&client_id=';
href += client_id + '&resource=https://webdir.online.lync.com&redirect_uri=' + window.location.href;
window.location.href = href;
});
$('#createmeeting').click(function() {
var client;
var conversation;
var Application;
console.log(sessionStorage.getItem('client_id'));
Skype.initialize({ apiKey: 'a42fcebd-5b43-4b89-a065-74450fb91255' }, function (api) {
Application = api.application;
client = new Application();
console.log('client created');
var meeting = client.conversationsManager.createMeeting();
meeting.subject('Planning meeting');
meeting.expirationTime(new Date + 24 * 3600 * 5);
meeting.onlineMeetingUri.get().then(uri => {
var conversation = client.conversationsManager.getConversationByUri(uri);
console.log(';'); // even this is not showing
}, function (error) {
console.log(error);
});
console.log(conversation);
}, function (err) {
console.log(err);
alert('Cannot load the SDK.');
});
});
答案 0 :(得分:0)
enter code here
新日期+ 24 * 3600 * 5? 结果为“ 2019年5月16日星期四09:48:15 GMT + 0800(中国标准时间)24 * 3600 * 5”
答案 1 :(得分:0)
您可能必须使用Application.signInManager.signIn
Skype.initialize({ apiKey: 'a42fcebd-5b43-4b89-a065-74450fb91255' }, api => {
var app = new api.application;
app.signInManager.signIn ({
username: '****',
password: '****'
}).then(() => {
console.log("signed in as", app.personsAndGroupsManager.mePerson.displayName());
}, err => {
console.log("cannot sign in", err);
});
}, err => {
console.log("cannot load the sdk package", err);
});