I have been working on the Graph API for the past few days. When I try to make an API call using the PHP-SDK, i get an empty json object as a response. But when i copy the access token from the links that are provided by FB in http://developers.facebook.com/docs/reference/api/, i get a json response.
I assume that this is because of the Access Token that i am sending in the request. Help Appreciated.
My Code :
include_once "fbInit.php";
$access = $facebook->getAccessToken();
$user = $facebook->getUser();
echo $access;
if(!$user)
{
$loginUrl = $facebook->getLoginUrl();
header("Location:".$loginUrl);
}
$userWall = $facebook->api('/me/feed',array('access_token'=>$access)) ;
var_dump($userWall);