Graph API returns 'false' or 'Unsupported get request' accessing public Facebook Page
Solution 1:
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
Solution 2:
A picture is worth a thousand words.
If you change even only one of these settings:
This is the response your client will receive:
{ "error": {
"message": "Unsupported get request.",
"type": "GraphMethodException",
"code": 100
}
}
Actually I have tried changing "Age Restrictions" and every setting which is not "Anyone (13)", will cause this problem.
Solution 3:
I had this issue but it was a country restriction that was causing the problem (even though I was in the correct country). Removing it solved the problem. Check if you have any restrictions that might seem irrelevant, because they could be causing the blockage.
Solution 4:
It seems the Graph API returns false
or some empty data when you try to access resources which have been restricted. For example, administrators of Facebook fan pages can restrict their access by age (this includes a special setting for pages about alcohol):
Selecting an age restriction means that anyone under the specified age will not be able to find your Page in search or on friends' profiles or view the content in other ways. This also means that logged out users will not be able to see your Page.
The Alcohol-Related age restriction sets the minimum age based on the location of the user. Only users in Canada, South Korea or Nicaragua who are 19+, in Japan, Iceland or Paraguay who are 20+, in Cameroon, Micronesia, Palau, Solomon Islands, Sri Lanka or the U.S. who are 21+, in India and Sweden who are 25+, and elsewhere who are 18+ will be able to view your Page. You understand that the Alcohol-Related age restriction is for convenience and that Facebook does not represent that by using that setting your Page will be legally compliant in all countries where your Page is visible. You understand that ultimately you are responsible for setting the proper legally compliant age restrictions for each country where your Page is visible.
They can also limit their access by country:
Enter one or more countries and then choose whether you want the page to be visible to or hidden from people in the listed countries. Entering one or more countries means that logged out users will not be able to see your Page. If no countries are listed, your Page will be visible to people located in all countries. You understand that you are responsible for setting the proper country restrictions to ensure that the content of your Page is appropriate for the country or countries where you allow it to be visible
For example, you will not be able to see this page if you are not logged into Facebook (you will be redirected to the Facebook homepage). And this is the same in the Graph API. Calling:
http://graph.facebook.com/105226926239
Will return:
false
However, if you manage to get an user access token (for example from the Graph API Explorer), and assuming the corresponding profile matches the restrictions defined for this page:
https://graph.facebook.com/105226926239?access_token=AAACEdEose0cBACIijRIMtayOiN5F58x6DxolYi8ezmpAIPORApnfQvG5Kj1ftOQhSzIgxkNxQiu4iBwozqRT3zTvswEvm0O0JobZC8AZDZD
Will return:
{
"id": "105226926239",
"name": "CodeReduc.com",
"picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/71056_105226926239_2230111_s.jpg",
"link": "http://www.facebook.com/pages/CodeReduccom/105226926239",
"likes": 1,
"category": "Local business",
"is_published": true
}
Unfortunately, it is not possible to use an application access token to retrieve this information, which could be useful in some cases.