i have been working tirelessly just to get this working, but for some reason, in the following code:
require_once 'facebook-php-sdk/src/facebook.php';
$facebook = new Facebook(FACEBOOK_API_KEY,FACEBOOK_SECRET);
$fb_user = $facebook->getUser();
the variable $fb_user is always null! i was wondering what i am missing in order to get this user and finally be able to get a user's friends list and application list.
thanks for any help!
UPDATE:
here's my new code. still returns null for $fb_user though:
require_once 'facebook-php-sdk/src/facebook.php';
const FACEBOOK_APP_ID   = '130889803597902';
const FACEBOOK_API_KEY  = '56800990331df98bfe358812eb6caf5d';
const FACEBOOK_SECRET   = '59e30217f9efc633253c6832d029ab02';
$facebook = new Facebook(
    array(
      'appId' => FACEBOOK_APP_ID, // application id
      'secret' => FACEBOOK_SECRET, // application secret
      'cookie' => true, // whether to enable cookie support
   )
);
$fb_user = $facebook->getUser();