-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogout.php
38 lines (34 loc) · 1.07 KB
/
logout.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
<?php
require 'config.php';
//ovewrites the cookie
unset($_COOKIE['PHPSESSID']);
$signed_request_cookie = 'fbsr_' . $_fbApiKey;
setcookie($signed_request_cookie, "", time()-3600, '/', $_SERVER['HTTP_HOST']);
session_destroy();
$facebook->destroySession();
?>
<html>
<head></head>
<body>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
// init the FB JS SDK
FB.init({
appId : '194305640709555', // App ID from the App Dashboard
channelUrl : '//WWW.agbcorplegal.com/Online_Assignment/lib/channel.html', // Channel File for x-domain communication
status : true, // check the login status upon init?
cookie : true, // set sessions cookies to allow your server to access the session?
xfbml : true // parse XFBML tags on this page?
});
FB.logout(function(response) {
FB.Auth.setAuthResponse(null, 'unknown');
});
// Additional initialization code such as adding Event Listeners goes here
};
</script>
<script type="text/javascript">
window.location='index.php';
</script>
</body>
</html>