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 ?
Related
Though it is mentioned in the docs about generating a preview without requiring the ad_account_id (https://developers.facebook.com/docs/marketing-api/generatepreview/v13.0). I even follow the parameters required. However, I keep getting this error (even though the endpoint was mentioned in the docs)
"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": "--"
}
Endpoint:
https://graph.facebook.com/<API_VERSION>/generatepreviews?ad_format=RIGHT_COLUMN_STANDARD&creative={
"object_story_spec": {
"link_data": {
"description": "Description",
"link": "<URL>",
"message": "Message",
"name": "Name"
}
}
}&access_token=<Access_Token>
However, It works when using the same endpoint but with the ad_account_id on it and with the same set of test data. So I assume there is no issue with my set of test data.
https://graph.facebook.com/<API_VERSION>/act_<ad_account_id>/generatepreviews?ad_format=RIGHT_COLUMN_STANDARD&creative={
"object_story_spec": {
"link_data": {
"description": "Description",
"link": "<URL>",
"message": "Message",
"name": "Name"
}
}
}&access_token=<Access_Token>
Maybe I'm missing something? Not really sure.
Thanks in Advance.
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" } }
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?
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 ?
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?