Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'facebook/src/facebook.php';
- $facebook = new Facebook(array(
- 'appId' => 'xxxxxxx',
- 'secret' => 'xxxxxxxx',
- 'cookie' => true
- ));
- $user = $facebook->getUser();
- if ($user) {
- try {
- // Proceed knowing you have a logged in user who's authenticated.
- $user_profile = $facebook->api('/me');
- } catch (FacebookApiException $e) {
- //echo '<pre>'.htmlspecialchars(print_r($e, true)).'</pre>';
- $user = null;
- }
- }
- var_dump($user_profile);exit;
Add Comment
Please, Sign In to add comment