Last active
April 22, 2016 21:33
-
-
Save Nakort/2a5077abcd067da419d6154a646ad71c to your computer and use it in GitHub Desktop.
Skype for business
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
var config = { | |
version: '', | |
apiKey: '', | |
apiKeyCC: '' | |
}; | |
Skype.initialize({ apiKey: config.apiKey }, | |
function (api) { | |
window.skypeWebAppCtor = api.application; | |
window.skypeWebApp = new api.application(); | |
Utils.openModalDialog({ | |
template: "/skype_sessions/new" | |
}); | |
}, | |
function (err) { | |
console.log(err); | |
} | |
); | |
$(document).on("submit", "#skype_for_business", function(event){ | |
event.preventDefault(); | |
var username = $("#skype_username").val() | |
var password = $("#skype_password").val() | |
var version = ''; | |
window.skypeWebApp.signInManager.signIn({ | |
version: version, | |
username: username, | |
password: password | |
}).then(function () { | |
console.log("logged in..."); | |
}, function (error) { | |
console.log("failed to log in..."); | |
}) | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment