Created
July 26, 2015 13:20
-
-
Save eyeballcode/a61da65fdf6db6e60be3 to your computer and use it in GitHub Desktop.
StackAPITokenTest
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<script src="http://teamfreehugs.github.io/js/StackAPI.js"></script> | |
<title>Testing</title> | |
<script> | |
(function() { | |
var instance = new StackAPI( | |
{ | |
clientID : 5239, | |
key : "JPRwkkqAelchw)6d9S8wcw((", | |
authNeeded : true, | |
redirect_uri : "http://teamfreehugs.github.io/stackexchange/stackapi", | |
scope : [ "read_inbox" ] | |
}); | |
var things = instance.authenticate(); | |
if (things["access_token"] != undefined) { | |
alert('Your access token is ' | |
+ things["access_token"] | |
+ ". " | |
+ (things["expires"] == null ? "" : "It expires in " | |
+ things["expires"] + " seconds. (IRK, weird.)")); | |
} | |
})(); | |
</script> | |
</head> | |
<body> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment