It's giving you an error when I use isset with new PHP methods:
<?php
require './fb.php';
if (isset(filter_input(INPUT_SESSION, "fb_access_token")) && !empty(filter_input(INPUT_SESSION, "fb_access_token"))):
echo "Ta logado!";
else:
header("Location: login.php");
endif;
Fatal error: Cannot use isset() on the result of an expression (you can use "null !== expression" instead) in C:\wamp64\www\bw7\index.php on line 9
Already using global variables, it works:
<?php
require './fb.php';
if(isset($_SESSION["fb_access_token"])):
echo "Ta logado!";
else:
header("Location: login.php");
endif;
Why?