HTML and CSS Reference
In-Depth Information
$facebook = new RWA_Facebook($fb_config);
// If the user is not logged in, send them to the login page
if (!$facebook->is_logged_in()) {
header('Location: login.php');
<!doctype html>
<html lang="en">
<meta charset="utf8" />
<title>Logged In!</title>
<h2>You're Logged In</h2>
Welcome to our super-sweet app!
<h3>Your Info</h3>
<?php echo $facebook->profile_image; ?>
<?php echo $facebook->name; ?>
<?php echo $facebook->email; ?>
<?php echo $facebook->username; ?>
<a href="?logout=1">Log out</a>
Like login.php , this file starts by turning on error reporting, including necessary files, and instantiating the
RWA_Facebook object in $facebook . it checks if the user is logged in and, if not, sends him to the login page.
For a logged-in user, a simple htML page is displayed with a quick welcome message, their info, and their profile
picture, as well as a logout button.
Search WWH ::

Custom Search