当我尝试通过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);
});

相关内容

  • 没有找到相关文章

最新更新