Facebook Audience Overlap via API not working - facebook-graph-api

I trying to call to overlap api via facebook graph api
The only source I find to facebook overlap is here
Facebook Audience Overlap via API
But when I trying it really not work
The call is in api v10.0
act_10202169727663069/audienceoverlap?pivot_id=6124596383156&{comparison_ids=["6124720495756","6122310977756"]}
The answer I get is:
{
"error": {
"message": "(#100) Tried accessing nonexisting field (audienceoverlap) on node type (AdAccount)",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "Avf-Fn29XQoHMU3bAxGNQBc"
}
}
Debug information
==== Query
curl -i -X GET \
"https://graph.facebook.com/v10.0/act_10202169727663069/audienceoverlap?pivot_id=6124596383156&%7Bcomparison_ids=%5B%226124720495756%22%2C%226122310977756%22%5D%7D&access_token=<access token sanitized>"
==== Access Token Info
{
"perms": [
"read_insights",
"ads_management",
"ads_read",
"business_management",
"pages_manage_ads",
"public_profile"
],
"user_id": "10224770822076304",
"app_id": 987735165367365
}
==== Parameters
- Query Parameters
{
"pivot_id": "6124596383156",
"{comparison_ids": "[\"6124720495756\",\"6122310977756\"]}"
}
- POST Parameters
{}
==== Response
{
"error": {
"message": "(#100) Tried accessing nonexisting field (audienceoverlap) on node type (AdAccount)",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "Avf-Fn29XQoHMU3bAxGNQBc"
}
}
==== Debug Information from Graph API Explorer
- https://developers.facebook.com/tools/explorer?method=GET&path=act_10202169727663069%2Faudienceoverlap%3Fpivot_id%3D6124596383156%26%7Bcomparison_ids%3D[%226124720495756%22%2C%226122310977756%22]%7D&version=v10.0

Related

Is it possible to GET unfollow count per day from instagram graph API?

I am trying to get follow and unfollow count per day from instagram Graph API.
Tried the metric follows_and_unfollows. It is giving me the following error:
Query used:
accnt_id?fields=insights.metric(follows_and_unfollows).period(day).since(2022-07-08).until(2022-08-01)
Response:
{
"message": "(#100) The following metrics (follows_and_unfollows) should be specified with parameter metric_type=total_value",
"type": "OAuthException",
"code": 100
..........
}
And on trying with the method mentioned in the above error
Query:
accnt_id?fields=insights.metric(follows_and_unfollows).period(day).since(2022-07-08).until(2022-08-01).metric_type(total_value)
Response
{
"error": {
"message": "(#100) Param metric_type on field insights: This param is not valid",
"type": "OAuthException",
"code": 100,
"fbtrace_id": ""
}
}
The link would look like how? with this specification

Application does not have permission for this action error: while publishing Instagram images

Using the below Facebook graph api to create a container for image upload:
curl --location --request POST 'https://graph.facebook.com/v14.0/17841453770969737/media?image_url=https://example.com/wp-content/uploads/2018/12/Images-without-copyright.png&caption=test1&access_token=EAAGYnCHTsQYBADhBYjYf9hjuixJZBUMXZBwrf5Hu9RFSc4uyV2VZBVdTLZAZAF1MG7VgAZCdBrP4ZBsNxMMYA7JRuoTgeUnPo4twHoPEmJhzoJpnYsTi1ZByTXW8kMVJCtfpZC7DDvgiZAlQaaaK3ZBy0NOfqXqwtNsAfyUpDsz7wOMsAZDZD'
17841453770969737 is the ig-user-id
getting the below error:
{
"error": {
"message": "(#10) Application does not have permission for this action",
"type": "OAuthException",
"code": 10,
"fbtrace_id": "AHGxC5Wplf6j1CKQmsIQcN5"
}
}

error 403 Request had insufficient authentication scopes in postman

I'm trying to retrieve from Postman the answers of a form I created on google form but I can't do it.
First of all I created a form on google form.
I sent it to a person to get some answers.
I followed this tutorial which allowed me to set up oauth 2.0 on postman https://www.vulongtran.com/how-to-use-postman-with-google-cloud-platform-apis
Then as indicated in the api documentation of google form, I put in postman the GET method and I pass him the following url:
I replace obviously the formId by the id of my form which is the following 1FAIpQLSdNlmrvlMXvUlhSjiTb7YsqjHCTYZNRlJlGJnwkxyzNNSPe3A
This gives me the following url:
This gives me the following url:
https://forms.googleapis.com/v1/forms/1FAIpQLSdNlmrvlMXvUlhSjiTb7YsqjHCTYZNRlJlGJnwkxyzNNSPe3A/response
Before sending the request from postman I go on Postman->Authorization and I select the token set up thanks to the tutorial of this site:
https://www.vulongtran.com/how-to-use-postman-with-google-cloud-platform-apis
This does not work I get the following error:
{
"error": {
"code": 403,
"message": "Request had insufficient authentication scopes.",
"status": "PERMISSION_DENIED",
"details": [
{
"#type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "ACCESS_TOKEN_SCOPE_INSUFFICIENT",
"domain": "googleapis.com",
"metadata": {
"service": "forms.googleapis.com",
"method": "google.apps.forms.v1.FormsService.GetForm"
}
}
]
}
}
I am completely blocked if anyone can help me please?
Translated with www.DeepL.com/Translator (free version)

Getting an error from Facebook Server-Side API when sending a pixel event

I am trying to make use of Facebook Server-Side API to send pixel events from my server. I'm making a POST request to this endpoint:
https://graph.facebook.com/v6.0/509380299968653/events?access_token=<SYSTEM_USER_ACCESS_TOKEN>
and sending this payload:
data:[
{
"event_name": "PageView",
"event_time": 1586978506,
"user_data": {
"fbc": "fb.1.1554763741205.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890",
"fbp": "fb.1.1558571054389.1098115397"
}
}
]
,
"test_event_code":"TEST13699"
However, I'm getting an error response from the facebook server:
{
"error": {
"message": "(#100) Tried accessing nonexisting field (events) on node type (AdsPixel)",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "AaqSg_DnGvvpjI3cWCK1yPU"
}
}
Need help to figure out what I'm doing wrong.

Instagram Graph API - Get comments for media

I am trying to get comments for some business account by using business discovery node. I can load list of media with the request
GET
https://graph.facebook.com/v3.1/17841402914723639?fields=business_discovery.username(bluebottle){followers_count,media_count,media{media_type,comments_count}}
This returns
{
"business_discovery": {
"followers_count": 297515,
"media_count": 1317,
"media": {
"data": [
{
"media_type": "IMAGE",
"comments_count": 18,
"id": "17970528943031455"
},
{
"media_type": "IMAGE",
"comments_count": 17,
"id": "17938949563163035"
},
{
"media_type": "IMAGE",
"comments_count": 66,
"id": "17966264041064104"
},
I assume the id in the media entry is an id for that object. But when I am trying to access it like
GET https://graph.facebook.com/v3.1/17970528943031455
I got an error
{
"error": {
"message": "Unsupported get request. Object with ID '17970528943031455' 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": "HbaasWNQ8ko"
}
}
Is it permission problem?
How can I get list of comments for a media?
According to the documentation: "An access token from a User who created the IG Media object, with the following permissions:" means that you need to have access permission granted by the owner of the post to have access to its comments.
The syntax of the query is :
business-account-id?fields=business_discovery.username(bluebottle){media{comments}}
But when I tried that I got this error :
{
"error": {
"message": "(#100) Please read documentation for supported fields.",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "BFuJQt0/Kt3"
}
}
So I'm guessing they have removed the support for fetching the comments.
You can only get comments if you have a valid authentication token for the account you are querying. You would use the /media or <media_id>/comments endpoint to get comments, insights, etc:
Media endpoint
/MY_IG_BUSINESS_ACCOUNT_ID/media?fields=id,caption,comments_count,children{media_url},comments.limit(50){id,timestamp,username,text},insights.metric(impressions,reach,engagement,saved,video_views)&limit=30
Comments endpoint:
/<MEDIA_ID>/comments/?fields=created_time,from,message,like_count&limit=50