I am trying to learn facebook app development and here s the code I am trying.
<?php
require_once 'config.php';
/* Get a valid session */
$session = $facebook->getUser();
$me = null;
if($session) {
/* Check if session is valid */
$me = $facebook->api('/me');
}
var_dump($me);
?>
I have set my app id and secret in config.php but it is failing to execute getUser(), all it returns is null.
Check it here.
http://facebookdevelop.byethost8.com/index.php
Do I need special setup to be done except copying facebook php sdk in hosting site? Is there a place where up-to date information is available which clearly defines step by step instructions?
This code works
Only need to figure out the difference.