Facebook graph api audience fbid does not accept - facebook

I want to integrate the facebook audience sdk.Documents are very difficult to solve. I'm stuck in a place
FacebookAdsApi.init(app_id=APP_ID,app_secret=APP_SECRET,access_token=ACCES
_TOKEN)
ad_account = AdAccount(fbid=FACEBOOK_ID)
params = {
CustomAudience.Field.subtype: CustomAudience.Subtype.custom,
CustomAudience.Field.name: 'My new CA',
CustomAudience.Field.description: 'People who bought on my website',
}
audience = ad_account.create_custom_audience(params=params)
When I send reqeust on python The bottom warning comes to me. But Im sure my fbid is true I got the necessary permissions but still the same situation
Status: 400
Response:
{
"error": {
"fbtrace_id": "HyhfMfSiw3S",
"type": "GraphMethodException",
"message": "Unsupported post request. Object with ID 'act_xxxxxxxx' 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",
"error_subcode": 33,
"code": 100
}
}

You need to make sure the app access token you are using should have access to your facebook ad project.

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

How to implement Graph-API to get data of Facebook Workplace

I have implemented Facebook API in our APP by using Graph-API. Now I am trying to implement FB-workplace in my application, but i am not able to get any workplace details by using graph-API. I am having my access_token.
I am using FB Graph-API explorer and Postman, but from both the ways i am getting nothing/Error. So What would i change in this to get that data or any more permission needs to update.
Please help in this.
{
"error": {
"message": "Unsupported get request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"error_subcode": 33,
"fbtrace_id": "AjRPf0Xnp7tkluvI9kWo"
}
}

Facebook/Instagram Ads API: "The page-id and/or post-id didn't resolve to a valid story."

I am trying to create an Ad on Instagram via the Facebook Ads API. Our system currently works fine with creating Ads to be published on Facebook, however when I try to create an Ad for Instagram I get the following error:
Message: Call was not successful
Method: POST
Path: https://graph.facebook.com/v3.2/act_115305119273030/ads
Params: {'name': 'Ad Name', 'adset_id': '120330000035581316', 'creative': '{"object_story_spec":{"instagram_actor_id":"2318910634825810","link_data":{"caption":"www.puxaforte.com","description":"Description Text","link":"http://www.puxaforte.com/index2.html","message":"Message Text","name":"Headline Text","picture":"https://storage.googleapis.com/advio-middleware-local-develop/5fc51781-dd91-4a0d-ac7a-0151dee97b92.jpg"},"page_id":"422303898241282"}}', 'status': 'PAUSED'}
Status: 400
Response:
{
"error": {
"message": "Invalid parameter",
"type": "OAuthException",
"code": 100,
"error_subcode": 1487531,
"is_transient": false,
"error_user_title": "Cannot load publish info",
"error_user_msg": "The page-id and/or post-id didn't resolve to a valid story.",
"fbtrace_id": "CJpZSFaGMSP"
}
}
I have updated my code on the Facebook only version to include the instagram_actor_id and the page_id is the ID of the Facebook Page affiliated to the Instagram account.
I don't understand what it means by "resolve to a valid story" and a long time spent looking at the docs and googling online has yielded no results! Has anyone had a similar problem?
Thanks in advance!

Get facebook album give error code 100

I use simple app but cannot understand next:
Opened 2 urls:
https://www.facebook.com/media/set/?set=a.675416519138045.1073741830.660049570674740&type=3
AND
https://www.facebook.com/joyasmariajose.valdivieso/media_set?set=a.383620231706322.80737.100001750452794&type=3
When I use Graph Exploder:
GET \675416519138045
return all information about album in this user
But When I try
GET \383620231706322
I can get only user_id and name. On the album have next error:
{
"error": {
"message": "Unsupported get request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100,
"fbtrace_id": "Hb9lKBi2Wpz"
}
}
Question: What can be wrong with second url ?
Unsupported get request usually means that you can't access that resource without an Access Token, i.e. you don't have permissions to this object, as #CBroe said.