How to get the if the Page is Liked in my Facebook Application page
Posted
by
Axe
on Stack Overflow
See other posts from Stack Overflow
or by Axe
Published on 2011-05-04T16:37:06Z
Indexed on
2011/06/22
8:22 UTC
Read the original article
Hit count: 201
facebook-c#-sdk
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?
© Stack Overflow or respective owner