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?
You can access Page Insights by typing /insights after the name of your page in the URL field. This command will retrieve all of the Insights associated with your Page. Type "/insights" after your company name. Click the Submit button.
Applies to all versions. Facebook Analytics will no longer be available after June 30, 2021. Additionally, we are deprecating the App Dashboard Plugin for Marketing API. For more information visit the Business Help Center.
Go to Tools – Graph API Explorer to generate Access Tokens for various kinds of API that you would like to use in your app. Choose the app and kind of token you need in the drop down menus in the left part of the screen. Then click “Generate Access Token”.
The Graph API is the primary way to get data into and out of the Facebook platform. It's an HTTP-based API that apps can use to programmatically query data, post new stories, manage ads, upload photos, and perform a wide variety of other tasks.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With