forked from D-Marc1/facebook-javascript-all-photos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·95 lines (91 loc) · 2.67 KB
/
index.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui, viewport-fit=cover">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>My App</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/framework7/3.1.0/css/framework7.css" />
<style>
.photo-thumb-link {
object-fit: cover;
object-position: center top;
width: 60px;
height: 60px;
}
.album-thumb {
width: 60px;
height: 60px;
}
#all-albums-link, #log-in-out-fb-link {
width: 100%;
}
#log-in-out-text {
margin-left: 5px;
}
</style>
</head>
<body>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : ENTER APP ID HERE,
autoLogAppEvents : true,
xfbml : true,
version : 'v3.0'
});
FB.getLoginStatus(response => {
app.dialog.close();
$$('.page-current').show();
if(response.status === 'connected') {
$$('#log-in-out-text').text('logged in')
.addClass('text-color-green');
$$('#log-in-out-fb-link').text('Logout')
.attr('data-status', 'in')
.addClass('color-red');
} else {
$$('#log-in-out-text').text('logged out')
.addClass('text-color-red');
$$('#log-in-out-fb-link').text('Login')
.attr('data-status', 'out')
.addClass('color-green');
}
});
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "https://connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div id="app">
<div class="view view-main">
<div data-name="index" class="page">
<div class="navbar">
<div class="navbar-inner sliding">
<div class="title">Facebook All Photos</div>
</div>
</div>
<div class="page-content">
<div class="card">
<div class="card-header">
<p style="margin: 0px;">Status:<span id="log-in-out-text"></span></p>
</div>
<div class="card-content card-content-padding">
<a id="all-albums-link" href="/fb-albums/" class="button button-fill">Fb Albums</a>
</div>
<div class="card-footer">
<a id="log-in-out-fb-link" class="button button-fill"></a>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/framework7/3.1.0/js/framework7.min.js"></script>
<script src="fb-code.js"></script>
<script src="script.js"></script>
</body>
</html>