Quotes help make search much faster. Example: "Practice Makes Perfect"
Showing posts with label SkyDrive. Show all posts
Showing posts with label SkyDrive. Show all posts
Tuesday, June 18, 2013
Codecademy Sample Solution: Logging In The User
// The callback URL to redirect to after authentication
redirectUri = "http://external.codecademy.com/skydrive.html";
//sample solution to helper.js
//note: you have to have a Microsoft account in order to log-in and finish the exercise
// Initialize the JavaScript SDK
WL.init({
client_id: '000000004C0E2C11',
redirect_uri: redirectUri
});
$(document).ready(function() {
// Start the login process when the login button is clicked
$('#login').click(function() {
WL.login({
scope: ["wl.skydrive wl.signin"]
}).then(
// Handle a successful login
function(response) {
$('#status').html("<strong>Success! Logged in.</strong>");
},
// Handle a failed login
function(responseFailed) {
// The user might have clicked cancel, etc.
$('#status').html(responseFailed.error.message);
}
);
});
});
Codecademy Sample Solution: Initializing the Javascript SDK
//sample solution to the helper.js file
WL.init({
client_id: ('000000004C0E2C11')
redirect_uri: ('http://external.codecademy.com/skydrive.html')
});
Codecademy Sample Solution: Setting Up
<!DOCTYPE html>
<html>
<head>
<title>My SkyDrive Web App</title>
<!-- Add wl.js here -->
<script src="http://js.live.net/v5.0/wl.js"></script>
<script src="helper.js"></script>
</head>
<body>
<p>Hello there! We'll fill this part out soon.</p>
</body>
</html>
Subscribe to:
Posts (Atom)
This is an example of scrolling text using Javascript.
Popular Posts
-
# Codecademy sample solution # What are the four commonly used HTTP methods ("verbs")? # A: FIND, SEND, UPDATE, REMOVE # B: ...
-
$("#tours > li")
-
<!--sample solution--> <html> <head> <title>Week 13 Project</title> </head> ...
-
//sample solution def isEven(x): if(x % 2 == 0): return "yep" else: return "nope"
-
<html> <head> <!-- Add the Parse SDK here! --> <script src="http://www.parsecdn.com/js/par...
-
<!-- Sample solution to index.html --> <!DOCTYPE html> <html> <body> <div class="nav"> ...
-
Answer: Alt - p p stands for previous. If you keep pressing Alt - p, you will continue cycling back through commands you typed before. I...
-
#sample solution hungry = false unless hungry puts "I'm writing Ruby programs!" else puts "Time to eat!...
-
// sample solution to panel.js $(document).ready(function(){ var $panel = $("#panel"); var $tab = $("#tab"); ...
-
//sample solution var yourName = "Pam"; var gender = "female"; var result; //Line 10 starts an if statement //Ne...