{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"milestone":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/99493b39cd100abe5bae0bc9752d1c9a?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"99493b39cd100abe5bae0bc9752d1c9a","url":"https://api.github.com/users/jcrick","login":"jcrick","id":1159278},"updated_at":"2011-10-30T21:14:23Z","labels":[],"assignee":null,"comments":4,"closed_at":null,"url":"https://api.github.com/repos/facebook/php-sdk/issues/496","body":"Dear All\r\n\r\nI know lots of people have had this problem. I have tried just about every suggestion in these forums but I still cannot get this to return a valid user object, whether logged in as myself or an alternative user.\r\n\r\nDoes anyone really understand what the problem is - it is fundamental and should be extremely simple so why is it so difficult for everyone to find the correct answer.\r\n\r\nMaybe there is something wrong with the application setup - but even if you follow the guidelines it makes no difference.\r\n\r\nCan someone please help to resolve this issue properly?\r\n\r\nHere is my code snippet:\r\n\r\n    <?php  \r\n      \r\n    require_once '.\\\\php\\\\facebook.php';  \r\n      \r\n    $appapikey = 'nnnnnnnn406267';  \r\n    $appsecret = 'nnnnnnnn164237a18089b61b78c38a32';  \r\n    $facebook = new Facebook($appapikey, $appsecret);  \r\n    $user_id = $facebook->getUser();  \r\n    $callbackurl = 'http://www.appppppp.com/facebook/';  \r\n      \r\nif($user_id) {\r\necho \"something\";\r\n}\r\n\r\nelse \r\n\r\n{\r\n$url = $facebook->getLoginURL();\r\necho $url;\r\n}\r\n\t  \r\n\techo \"<P>\";\r\n\techo $user_id;\r\n\t  \r\n\t\r\n    ?>  \r\n\r\n\r\n\r\nMany thanks\r\n\r\nJerry","html_url":"https://github.com/facebook/php-sdk/issues/496","title":"PHP SDK $facebook->getUser() always returns 0","number":496,"id":2086379,"created_at":"2011-10-29T09:07:49Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/a123410cfb9ea6510294a295bb548530?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"a123410cfb9ea6510294a295bb548530","url":"https://api.github.com/users/mikesherov","login":"mikesherov","id":364532},"updated_at":"2011-10-30T21:14:23Z","url":"https://api.github.com/repos/facebook/php-sdk/issues/comments/2571572","body":"This is not a support forum. Try getting help on http://facebook.stackoverflow.com\r\n\r\nAlso, this is a duplicate of #393","id":2571572,"created_at":"2011-10-30T21:14:23Z"}}