How to delete a facebook marketing lead form using graph api - facebook

According to the facebook documentation here Deleting a Lead Form
this is how you do it:
Send a delete http request to https://graph.facebook.com/v2.10/formId?access_token=the_access_token.
However I get the error below when I try the above:
{
"error": {
"message": "(#210) This call requires a Page access token.",
"type": "OAuthException",
"code": 210,
"fbtrace_id": "ABC123/xyz"
}
}
When I use a Page access token (as suggest by the error response) this is what I get:
{
"error": {
"message": "(#3) Subject must be on whitelist",
"type": "OAuthException",
"code": 3,
"fbtrace_id": "IJK123/uvw"
}
}
If it matters the accessToken initially used is the same token used to create the leadform.
How can I get this to work? What am I missing?

Related

Facebook Ad Keyword Stats is not woking

I wang to get the ad keyword stats using Facebook API, the reference API docs is :
https://developers.facebook.com/docs/marketing-api/reference/ad-keyword-stats/
I used https://graph.facebook.com/v11/ad_id/keywordstats?access_token=alskfajslkfjdlasjfldjaslkfdjlaksjlfkslfkdlasfd
ad_id used: AD ID
alskfajslkfjdlasjfldjaslkfdjlaksjlfkslfkdlasfd using real token.
but I got an error:
{
"error": {
"message": "(#12) Ads keywords stats is deprecated for versions v5.0 and higher",
"type": "OAuthException",
"code": 12,
"fbtrace_id": "AUGEDqfoo-5VroAam7bYIWf"
}
}
if I use v5.0, it will get :
{
"error": {
"message": "(#2635) You are calling a deprecated version of the Ads API. Please update to the latest version: v11.0.",
"type": "OAuthException",
"code": 2635,
"fbtrace_id": "Ayp8vk9LmHaSb5hKWFFnY_B"
}
}
so what should I do ?

Facebook graph api filtering nested object

How to filter by creativeid on Ads using facebook graph api.
I tried below query but it is not working.
act_xxxxxx/ads?fields=creative{id}&filtering=[{field: "creative",operator:"EQUAL", value:"id_of_creative"}]
act_xxxxxx/ads?fields=creative{id}&filtering=[{field: "ad.creative.id",operator:"EQUAL", value:"id_of_creative"}]
act_xxxxxx/ads?fields=creative{id}&filtering=[{field: "creative.id",operator:"EQUAL", value:"id_of_creative"}]
But for all above response is
{ "error": { "message": "(#100) Filtering field 'creative.' with operation 'equal' is not supported", "type": "OAuthException", "code": 100, "error_data": "An unknown error occurred", "fbtrace_id": "AlWsddsx" } }

How can I access the public metadata of facebook pages, using my access token?

{
"error": {
"message": "(#100) Page Public Metadata Access requires either app secret proof or an app token",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "AZGveQoRg2l6tGu5fTMIj3o"
}
}

Facebook graph API search in group feed

According to Facebook graph API playground it is possible to search in a page/group feed ,
I'm using the following URL to do so:
https://graph.facebook.com/<group_id>/feed?q=<search query>&access_token=<access_token>
And this is the result i'm getting:
{
"error": {
"message": "An unknown error has occurred.",
"type": "OAuthException",
"code": 1,
"fbtrace_id": "FVaffSuGwvg"
}
}
What is the problem here ?

How get information about post from facebook graph api

Suppose to have an post_id and I must get if post exists or not.
The code is :
https://graph.facebook.com/1485990275062935/
I obtain this error:
{
"error": {
"message": "An access token is required to request this resource.",
"type": "OAuthException",
"code": 104,
"fbtrace_id": "G4De0dxJHFM"
}
}
Anyone can help me to pur access token in link?