Skip to content

Commit 7d491d7

Browse files
committed
init
1 parent 51c6257 commit 7d491d7

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

Diff for: callback.html

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
4+
<title>Connect with SoundCloud</title>
5+
</head>
6+
<body onload="window.opener.setTimeout(window.opener.SC.connectCallback, 1)">
7+
<b style="width: 100%; text-align: center;">This popup should automatically close in a few seconds</b>
8+
</body>
9+
</html>

Diff for: index.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE HTML>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Lightning for SoundCloud</title>
6+
</head>
7+
<body>
8+
!LIGHTNING!
9+
10+
<script src="http://connect.soundcloud.com/sdk.js"></script>
11+
<script src="js/lightning.js"></script>
12+
</body>
13+
</html>

Diff for: js/lightning.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
SC.initialize({
2+
client_id: 'd214e0bc838d15c8b31cca256119cb23',
3+
redirect_uri: 'http://blissdev.github.com/lightning/callback.html'
4+
});
5+
6+
// initiate auth popup
7+
SC.connect(function() {
8+
SC.get('/me', function(me) {
9+
alert('Hello, ' + me.username);
10+
});
11+
});

0 commit comments

Comments
 (0)