I'm trying to check whether a user has liked my app using this code:
$signed_request = $facebook->getSignedRequest();
$liked = $signed_request['page']['liked'];
echo($liked);
But it doesn't return anything. On the other hand, if I do:
$signed_request = $facebook->getSignedRequest();
$expires = $signed_request['expires'];
echo($expires);
it does return an appropriate value. Is this something to do with permissions?
thanks
You can get page info parameters with signed_request only if it is a page tab application. If it is a canvas app, you can get like info with a FQL query:
SELECT uid FROM page_fan WHERE page_id="PAGE_ID" and uid = me()