I've been having some problems with a few Fan Pages and getting their details with the Facebook Graph API.
When I try to get the details for the Fan page, Graph API only returned false
, but is now returning
{
"error": {
"message": "Unsupported get request.",
"type": "GraphMethodException",
"code": 100
}
}
This is not the situation with all Facebook Pages, just for a few.
For example, when I try to get the details for this page at https://graph.facebook.com/CaptainMorganMacedonia, it only returns an error.
The page is public and has more than 25 fans, but I still have problems fetching the details of the page. Is it something with Facebook, or does the page have some bad configuration?
Assuming the page is Alcohol gated (In the OP's example the page was an alcohol page) you must access the page with an access token for a user who meets the alcohol restrictions.
For alcohol specifically, any user over 21 should be able to do this, and for some markets it's lower (depending on the drinking age in that market).
In the general case, if a page has demographic (country or age) restrictions on its visiblity, is restricted for alcohol reasons, or is unpublished, A Page or App access token will not work when trying to access that page's details or feed.
You must use a user access token for a user who has permission to view the page.
If the user does not meet the restrictions placed by the page admin, false
was returned.
This has (since September 2012) been replaced with an OauthException with the text Unsupported get request.
and code 100
This is a catch-all error which usually means a privacy check has failed. For pages, the cause is almost certainly that the page is unpublished, gated to certain countries or age groups, or marked as an alcohol page