File: /var/www/vhosts/amphoragames.com/core_OLD/index2.php
<?php
require('config.php');
?>
<html>
<head>
<!-- Amphora Games Go (codename: menudo) -->
<link href="https://fonts.googleapis.com/css?family=Exo" rel="stylesheet">
<link href="<?=Config::baseURL('/css/main.css')?>" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="<?=Config::baseURL('/js/main.js')?>"></script>
</head>
<body>
<?php
$fb = new Facebook\Facebook([
'app_id' => '{app-id}', // Replace {app-id} with your app id
'app_secret' => '{app-secret}',
'default_graph_version' => 'v2.2',
]);
$helper = $fb->getRedirectLoginHelper();
$permissions = ['email']; // Optional permissions
$loginUrl = $helper->getLoginUrl(Config::baseURL('/fb-callback.php'), $permissions);
echo '<a href="' . htmlspecialchars($loginUrl) . '">Log in with Facebook!</a>';
?>
</body>
</html>