forked from MrSwitch/hello.js
-
Notifications
You must be signed in to change notification settings - Fork 1
/
profile.html
25 lines (21 loc) · 938 Bytes
/
profile.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!DOCTYPE html>
<link rel="stylesheet" href="/_packages/document.css" />
<script src="/_packages/document.js"></script>
<script src="client_ids.js"></script>
<script src="../src/hello.js"></script>
<script src="../src/modules/windows.js"></script>
<script src="../src/modules/facebook.js"></script>
<script src="../src/modules/google.js"></script>
<h1>Demo hello.api('/me')</h1>
<button id='google' onclick="hello.login('google');">google</button>
<button id='facebook' onclick="hello.login('facebook');">facebook</button>
<button id='windows' onclick="hello.login('windows');">windows</button>
<script class="pre">
hello.on('auth.login', function(r){
// Get Profile
hello( r.network ).api( '/me' ).success( function(p){
document.getElementById(r.network).innerHTML = "<img src='"+ p.thumbnail + "' width=24/>Connected to "+ r.network+" as " + p.name;
});
});
hello.init( CLIENT_IDS, {redirect_uri:'../redirect.html'});
</script>