forked from MrSwitch/hello.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dropbox.html
53 lines (38 loc) · 1.24 KB
/
dropbox.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<link rel="stylesheet" href="/adorn/adorn.css"/>
<script src="/adorn/adorn.js" async></script>
<script src="../src/hello.polyfill.js"></script>
<script src="../src/hello.js"></script>
<script src="./client_ids.js"></script>
<script src="../src/modules/dropbox.js"></script>
<link rel="stylesheet" href="./helper/uiFiles.css"/>
<title>hello( dropbox )</title>
<h1>hello( dropbox )</h1>
<button id='profile' onclick="demo();">Dropbox</button>
<div id="uiFiles"></div>
<p>Include the UI demo script.</p>
<script src="./helper/uiFiles.js" class="pre"></script>
<script class="pre">
function demo(){
var dropbox = hello('dropbox');
dropbox.login().then(function() {
dropbox.api("me").then(function(p) {
document.getElementById('profile').innerHTML = "Connected to dropbox as " + p.name;
});
// See the included script of this same name.
uiFiles('dropbox');
});
}
</script>
<script class="pre">
hello.init({
'dropbox' : DROPBOX_CLIENT_ID,
},
{
redirect_uri:'../redirect.html',
// OAuth Proxy Is required to sercurely handle communications the service
// The service https://auth-server.herokuapp.com can be used to authenticate the User+App
// And then sign subsequent requests
oauth_proxy : OAUTH_PROXY_URL
});
</script>