Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2016
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. (function(){
  2. var config = {
  3. version: '',
  4. apiKey: '',
  5. apiKeyCC: ''
  6. };
  7.  
  8. Skype.initialize({ apiKey: config.apiKey },
  9. function (api) {
  10. window.skypeWebAppCtor = api.application;
  11. window.skypeWebApp = new api.application();
  12. Utils.openModalDialog({
  13. template: "/skype_sessions/new"
  14. });
  15. },
  16. function (err) {
  17. console.log(err);
  18. }
  19. );
  20.  
  21. $(document).on("submit", "#skype_for_business", function(event){
  22. event.preventDefault();
  23. var username = $("#skype_username").val()
  24. var password = $("#skype_password").val()
  25. var version = '';
  26.  
  27. window.skypeWebApp.signInManager.signIn({
  28. version: version,
  29. username: username,
  30. password: password
  31. }).then(function () {
  32. console.log("logged in...");
  33. }, function (error) {
  34. console.log("failed to log in...");
  35. })
  36. });
  37. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement