How to get the if the Page is Liked in my Facebook Application page
- by Axe
I'm using the Facebook sdk from codeplex
I've tried the suggestion at How to get the Page Id in my Facebook Application page
which is this:
if (FacebookWebContext.Current.SignedRequest != null)
{
dynamic data = FacebookWebContext.Current.SignedRequest.Data;
if (data.page != null)
{
var pageId = (String)data.page.id;
var isUserAdmin = (Boolean)data.page.admin;
var userLikesPage = (Boolean)data.page.liked;
}
else
{
// not on a page
}
}
But my data.page is null.
Do I need to ask for some extra permissions on the authorization or something?
Also tried this the FQL suggested at
http://blog.woodylabs.com/2010/09/facebook-graph-api-is-user-a-fan-of-page-id-using-fql-and-opengraph-to-mimic-pages-isfan/
But I only have an appId not a page ID.
Any ideas?