-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
53 lines (36 loc) · 1.22 KB
/
index.php
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
<?php
// Get configuration file
require_once "config.php";
//Redirect URL after Facebook Authantication
$redirectURL = "http://localhost/fb/fb-callback.php";
// Required permissions
$permissions = ['email'];
//Generate Login URL using FB Object
$loginURL = $helper->getLoginUrl($redirectURL,$permissions);
// If user is already logged in redirect to home
if(isset($_SESSION['accesToken']))
{
header('Location: home.php');
exit();
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Memorise</title>
<link rel="icon" href="images/icon.png" type="image" sizes="16x16">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="css/login.css" />
</head>
<body>
<div class="wrapper">
<h1>Memorise</h1>
<p>The place where you live back your memoris,<br> Get your facebook photos and have fun.</p>
<div class="btn">
<button onclick="window.location.href='<?php echo $loginURL?>'" type="button">Login With Facebook</button>
</div>
</div>
</body>
</html>