User has a Facebook page, but the me/accounts
endpoint returns an empty array, even though it is visible to the access token debugger.
From the access token debugger, the access token is a valid User access token, and the scopes granted are user_photos, email, pages_show_list, pages_read_engagement, pages_read_user_content, public_profile
From the access token debugger, the granular Scopes are pages_show_list, pages_read_engagement and pages_read_user_content, and link to the page.
I can get the page ID from the access token debugger https://developers.facebook.com/tools/debug/accesstoken/
I can get the page access token using /{pageid}?fields=access_token
I can therefore access the page content this way.
me/accounts
endpoint is empty{
"data": [
]
}
Affects all API versions.
I believe this is a Facebook bug? Any ideas how to fix?
Try adding the business_management
permission to the token.
Have a look here: https://developers.facebook.com/docs/graph-api/reference/user/accounts/
To access accounts using a business_id or for a user who owns any business Pages, the app must be approved for the business_management permission.
If business_permission is not included in the token permissions, users/pages using the Meta Business Suite will not be included in the response. That is probably why you get the empty data
.
I am trying to get bussiness_management permission for my app but it keeps getting rejected with the reason that the business_management permission request was rejected due to the unclear use case. Any solution for that?
We got it approved just by showing in the screencast and in the app review forms the links to their docs and the example of request with and without the business_management
. We also stated that we want to support users who are using the Meta Business Suite on their end and that was sufficient.
Hey, Krystian I couldn't find this text on the /user/accounts page. Are you on a specific version? I checked the recent 3 versions, 18,19 and 20
To access accounts using a business_id or for a user who owns any business Pages, the app must be approved for business_management
permission.
We're also facing this issue, and adding the business_management
permission fixes the issue, but it's not mentioned in the docs. They'd prob reject the app review :(
Hey, Ian Have you managed to solve this issue? We are facing the same issues. I tried to use business_management permission as it suggested and it works, but I am not sure we will be able to pass App Review for that permission. I have tried to report a bug but it impossible now. It seems that bug reporting disabled, at least for Graph API issues.