Meta graph api post/insights permissions error - facebook

I am using Graph API Explorer - Meta for developers to test available APIs on my page.
When testing insights APIs with available metrics, all metrics related to page worked well and returned data. However, when trying to get insights of a page post, the API fails and returns the following error.
{
"error": {
"message": "Permissions error",
"type": "OAuthException",
"code": 200,
"error_subcode": 1504029,
"is_transient": false,
"error_user_title": "User doesn't have enough permissions to load insights",
"error_user_msg": "You do not have enough permission to view the metric.",
"fbtrace_id": "AVGaadEbmGMteMFk_Gu3Xda"
}
}
I am already adding pages_read_engagements and read_insights permissions in Page Access Token.
API example:
https://graph.facebook.com/v15.0/{page-id}_{post-id}/insights/post_reactions_like_total?access_token={access-token}
How to solve this error?
Is this error related to low number of likes on the page (35 likes)?

Related

Unsupported post request. Object with ID act_xxxxxxxxx does not exist

I'm trying to create new custom-audience via facebook graph API as it said on page https://developers.facebook.com/docs/marketing-api/audiences/guides/custom-audiences and i'm getting this error
Status: 400
Response:
{
"error": {
"message": "Unsupported post request. Object with ID 'act_xxxxxxxxxx' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"error_subcode": 33,
"fbtrace_id": "HihUXD8a35/"
}
}
What permission do i need to make successfull API request or what other reasons could cause this error?
Main task is to make an app that would upload user's data as custom audiences from CRM to Facebook Business Manager account. What steps do I need to follow to that successfully?

Facebook ads leads retrieving (GraphMethodException)

https://graph.facebook.com/v14.0/{lead_id}?access_token=
I'm using this endpoint to get lead data from Facebook Ads forms. When I use this tool (https://developers.facebook.com/tools/lead-ads-testing/) to test the form, it goes well. But in real life (for audience), the leadgen_id comming from webhook's body (https://developers.facebook.com/docs/marketing-api/guides/lead-ads/retrieving/#webhooks) does not work:
{
"error": {
"message": "Unsupported get request. Object with ID '<leadgen_id from webhook>' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https:\/\/developers.facebook.com\/docs\/graph-api",
"type": "GraphMethodException",
"code": 100,
"error_subcode": 33,
"fbtrace_id": "PzqVPIf..."
}
}
At first, I suspected it could be something related to permission, but this other tool (https://developers.facebook.com/tools/debug/accesstoken) said that all the permissions needed were set:
Image

Facebook graphapi claim pages

I am trying to request access to a page with my business manager running this call in graphapi:
POST: {businessid}/client_pages?page_id={pageid}&permitted_roles=['ADVERTISER']
With my systemuser admin token as requested per documentation:
https://developers.facebook.com/docs/marketing-api/business-asset-management/guides/pages
this will result in an error
{
"error": {
"message": "(#10) Application does not have permission for this action",
"type": "OAuthException",
"code": 10,
"fbtrace_id": "{traceid}"
}
}
Now i cant find anywhere in the documentation that i need further permissions than just being a systemuser and having access to the business.
My permission list on developer.facebook
I am missing a permission but i cant figure out which one, any ideas ? :)
Cheers

Scraping Data from Facebook Marketplace using GraphAPI

I am trying to scrape data from Facebook Marketplace in a legal way by using their APIs and access tokens. My first attempt is to use GraphAPI with queries in the form of
https://graph.facebook.com/post_id?access_token=token&fields=comments.summary(true).limit(999).filter(stream).fields(id,message,created_time,parent)
However using the post id from Facebook Marketplace doesn't seem to be working, giving me the error message
{
"error": {
"message": "Unsupported get request. Object with ID '292294948474070' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"error_subcode": 33,
"fbtrace_id": "AOhjN4-go7O0hWgLpJDcWCQ"
}
}
Is there another way to scrape data from Marketplace or some method of GraphAPI that I am missing? My goal for the project is to analyze the market for surfboard sales on Marketplace from this page https://www.facebook.com/marketplace/honolulu/search/?sortBy=creation_time_descend&query=surfboard&exact=false.

Send messages via Graph API stop working

Am testing this method via Facebook graph api explorer
https://developers.facebook.com/tools/explore
i chose my user and give him access to pages_messaging read_page_mailboxes manage_pages
then choose certain page and method {conversatio_id}/messages with POST request
and send parameter
message: "test test"
I got this response
{
"error": {
"message": "(#210) This call requires a Page access token.",
"type": "OAuthException",
"code": 210,
"fbtrace_id": "C+Xo8LCuuLW"
}
}
Facebook reference
https://developers.facebook.com/docs/graph-api/reference/v2.10/conversation/messages
This is issue reported in Facebook API and fixed now!
https://developers.facebook.com/bugs/261578841015508/