This repository has been archived by the owner on Jan 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
65 lines (57 loc) · 1.66 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>jQuery Facebook Multi-Photo Selector (jfmps) - http://seanhellwig.github.com/jfmps/</title>
<style type="text/css">
body{background:#ccc;}
</style>
<link rel="stylesheet" href="build/jquery.facebook.multiphoto.select.min.css">
</head>
<body>
<div id="jfmps-container"></div>
<input id="jfmps-submit-button" type="submit" value="Use Selected Photos"/>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.js"></script>
<script src="build/jquery.facebook.multiphoto.select.min.js"></script>
<script>
(function($){
/** CHANGE THIS TO YOUR FACEBOOK APP ID **/
FB.init({appId: '202125033143908', cookie: true, oauth: true});
FB.getLoginStatus(function(response) {
if (response.session) {
init();
} else {
login();
}
});
function login() {
FB.login(function(response) {
if (response.authResponse) {
init();
} else {
alert('Login Failed!');
}
}, {scope:'user_photos'});
}
function init() {
FB.api('/me', function(response) {
// ALL params are OPTIONAL. Defaults are passed in to show available params.
$('#jfmps-container').jfmps({
noAlbumImagesText: 'You have no images in this album.',
noAlbumsText: 'You do not have any albums.',
submitCallback: function(jsonData){ alert(jsonData); },
imageSubmitButton: $('#jfmps-submit-button'),
maxPhotosSelected: 10,
numAlbumColumns: 4,
numPhotosColumns: 6,
debug: true
});
});
}
})(jQuery);
</script>
</body>
</html>