Reputation: 1394
Recently preview version of new Skype SDK has been released. So I've downloaded samples, read MSDN articles and tried to write simplest JS script to make login to this SDK. So, I've taken code from this MSDN article and slightly modified it(sample code hasn't been working at all - used wrong variable). Modified code works, but returns error:
"TypeError: Cannot read property '1' of null at https://swx.cdn.skype.com/build2015/v5/SDK-build.js:8982:77 at handle (https://swx.cdn.skype.com/build2015/v5/SDK-build.js:2220:63) at https://swx.cdn.skype.com/build2015/v5/SDK-build.js:698:34".
So my code is below:
$(function () {
'use strict'; // create an instance of the Application object;
// note, that different instances of Application may
// represent different users
var Application
var client;
Skype.initialize({
apiKey: 'SWX-BUILD-SDK',
}, function (api) {
Application = api.application;
client = new Application();
// when the user clicks on the "Sign In" button $('#signin').click(function () {
// start signing in
client.signInManager.signIn({
username: 'login',
password: 'pass'
}).then(
//onSuccess callback
function () {
// when the sign in operation succeeds display the user name
alert('Signed in as ' + application.personsAndGroupsManager.mePerson.displayName());
},
//onFailure callback
function (error) {
// if something goes wrong in either of the steps above,
// display the error message
alert(error || 'Cannot sign in');
});
}, function (err) {
alert('some error occurred: ' + err);
});
});
What am I doing wrong?
Upvotes: 1
Views: 1260
Reputation: 1394
Finally I've found right answer: for now Skype Web SDK is only for Skype for Business not Skype for consumers. Sad but true.
Upvotes: 1