无法登录SKYPE SDK示例

时间:2015-05-27 17:24:16

标签: skype skype-for-business

我正在尝试运行使用新SKYPE SDK分发的Web示例。我没有内部部署Lync服务器,所以我使用网站上提供的域名和令牌登录。

Domain=metio.net
Token= Bearer cwt=AAEBHAEFAAAAAAAFFQAAAKuuXmvzGAIi1fxkeZUMAACBEFGt0YtqM3BVrxhrtkQkKFqCAoCDgyBiUaV6fPrpGdHv_Vl5hHoss0owQitMzh9xvY5tjoKyLoYIslm_avRm0ggNEPafGCkKskFVn6NvOvBYlbY

但登录永远不会完成。忙碌的圈子永远旋转着。有没有人得到这个工作?

3 个答案:

答案 0 :(得分:0)

我看到了这个问题,这就是它如何解决的问题:

  1. 在本地IIS(不是IIS Express)上托管SDK示例(或项目)。
  2. 这样您就可以使用机器IP(例如http://10.100.101.185/http://10.100.101.185/sdksamples/)而不是http://localhost/访问该网站。
  3. 现在,如本文所述(步骤3),Lync服务器将此IP添加到受信任的连接中。
  4. 您现在应该可以完成登录过程。

    此致

答案 1 :(得分:-1)

试试这段代码



<html>
<head>
<!-- JQuery. Skype Web SDK requires JQuery to work. -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!-- Bootstrap layouts and themes. Totally optional, but it makes the examples look much nicer -->
<link rel="stylesheet" type="text/css" href="../../assets/metro/css/metro-bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
<!-- This is the Skype for Web SDK -->
<script type="text/javascript" src="//swx.cdn.skype.com/shared/v/1.1.23.0/SkypeBootstrap.js"></script>
</head>
<body>
<div id="header"></div>
<!-- Skype for Web API Code by Tom Morgan | thoughtstuff.co.uk -->
<!-- This is one of a number of examples showing how to use the Skype for Web API. The full list is at skypewebsdk.com -->
<!-- Disclaimer: use at your own risk. -->
<div class="form-horizontal">
<div class="form-group">
<label for="username" class="col-sm-2 control-label">Username</label>
<div class="col-sm-10">
<input type="email" class="form-control" id="username" placeholder="Email">
</div>
</div>
<div class="form-group">
<label for="password" class="col-sm-2 control-label">Password</label>
<div class="col-sm-10">
<input type="password" class="form-control" id="password" placeholder="Password">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-10">
<button class="btn btn-default" id="btnLogIn">Log in</button>
</div>
</div>
</div>
<div id="footer"></div>
<!-- This is not needed for the samples to run, but adds standard headers and footers to the samples, to display title, instructions, about etc.
If you're taking this code and using it yourself, you can remove this.-->
<script type="text/javascript" src="../../assets/layoutcodesample-min.js"></script>
<script type="text/javascript">
<!-- These variables are only needed for laying out the code sample, they are not part of the sample code. -->
var pageTitle = "Getting Logged In";
var blogPostLocation = "http://blog.thoughtstuff.co.uk/2015/04/learn-skype-web-sdk-day-1-logging-in/";
var githubLocation = "https://github.com/tomorgan/SkypeWebSDKSamples/blob/gh-pages/Login/Getting%20Logged%20In/index.htm";
var client;
$(function () {
'use strict';
Skype.initialize({
apiKey: 'SWX-BUILD-SDK',
}, function (api) {
client = new api.application();
}, function (err) {
alert('some error occurred: ' + err);
});
$('#btnLogIn').click(function () {
// start signing in
client.signInManager.signIn({
username: $('#username').val(),
password: $('#password').val()
}).then(function () {
//log in worked!
alert('Logged in!');
}, function (error) {
//Something went wrong.
alert(error);
});
});
});
</script>
</body>
</html>
&#13;
&#13;
&#13;

答案 2 :(得分:-1)

我正在浏览他们网站上的Skype样本,但我无法让这些样本发挥作用。我使用上面列出的样本,我在metio.net和oauth令牌中输入。我遇到的问题是我在工作网络中使用这些样本。必须有某种防火墙或其他问题阻止样本表单工作,因为一旦我从家用计算机上尝试它就可以正常工作。