<p><a href="http://api.facebook.com/login.php?api_key=<?php
echo $facebook_api_key;
?>
" target="_blank">log in to facebook</a></p>
<form method="GET"><p>then paste the token from the url here: <input type="text" name="auth_token" size="20"><input type="submit" value="finish login"></p></form>
<?
}
}
if ($session_key) {
echo "<p>logged in as $uid, with sess key $session_key</p>";
echo "<p>Trying to getInfo</p>";
try {
$r = $client->users_getInfo(array($uid), array("about_me", "affiliations", "birthday", "books", "clubs", "current_location", "first_name", "gender", "hometown_location", "hs_info", "interests", "last_name", "meeting_for", "meeting_sex", "movies", "music", "name", "political", "pic", "relationship_status", 'quote', "school_info", "tv", "work_history"));
} catch (Exception $e) {
echo "<script>location.href='?newsession_req=1'</script>";
exit;
}
echo "<div clear='all'><p>user info:</p><pre>".htmlspecialchars(var_export($r, TRUE))."\n"
.htmlspecialchars($client->last_xml)
."</pre>";
}
?>