[英]net::ERR_INSECURE_RESPONSE on using Skype web sdk to login
[英]No response or error is coming when I try to schedule a meeting via Skype web sdk
我正在尝试使用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.');
});
});
enter code here
新日期+ 24 * 3600 * 5? 结果是“2019年5月16日09:48:15 GMT + 0800(中国标准时间)24 * 3600 * 5”
您可能必须使用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); });
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.