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
-
//Sample Solution const gameState = {} function preload() { this.load.image('codey', 'https://s3.amazonaws.com/codecademy-...
-
//sample solution function guessNumber(number, clue) { // Prompt the user for a number using the string value of clue guess = promp...
-
//sample solution //Here is the original card object var card1 = {"suit":"clubs", "rank": 8}; //Create a...
-
#sample solution def colorful_conditions(): color = "blue" if color == "red": return "firs...
-
function checkAnswerWrongPlace(ans, realanswer){ // This method compares two input strings representing a player's guess ("an...
-
Instruction: Find the id of the flights whose distance is below average for their carrier. Sample Solution: SELECT id FROM flights AS f...
-
# note: The instructions state to use "text.txt" but an error comes up stating that the file does not exist # as a work around, ...
-
# Sample Solution # Import packages import numpy as np import pandas as pd # Read in transactions data transactions = pd.read_csv(...
-
# Sample Solution from song_data import songs import numpy as np q1 = np.quantile(songs, 0.25) #Create the variables q3 and interquarti...
-
/*sample solution for style.css*/ body > p { background: green; } p { background: yellow; }