Facebook Graph API - different values for actions between Facebook and API

0

I'm using the Facebook API (Ads Insights) to return campaign actions. However the value returned by the API does not match any value shown in Facebook's own publication

My JavaScript Request

var d = new FormData();
d.append("access_token", MEU_TOKEN);
d.append("fields", "actions");
d.append("date_preset", "lifetime"); // I want lifetime data

return await (await fetch("https://graph.facebook.com/v3.1/" + campaignid + "/insights", {
    method: "post",
    body: d
})).json();

This request is asynchronous, after the response I consult the data by the following URL:

link

This is the JSON returned by the API

{
    "data": [
        {
            "actions": [
                {
                    "action_type": "comment",
                    "value": "2"
                },
                {
                    "action_type": "like",
                    "value": "4"
                },
                {
                    "action_type": "photo_view",
                    "value": "30"
                },
                {
                    "action_type": "post",
                    "value": "1"
                },
                {
                    "action_type": "link_click",
                    "value": "7"
                },
                {
                    "action_type": "page_engagement",
                    "value": "249"
                },
                {
                    "action_type": "post_engagement",
                    "value": "245"
                },
                {
                    "action_type": "post_reaction",
                    "value": "205"
                }
            ],
            "date_start": "2018-07-09",
            "date_stop": "2018-07-15",
            "ad_id": null // removed
        }
    ],
    "paging": {
        "cursors": {
            "before": "MAZDZD",
            "after": "MAZDZD"
        }
    },
    "__fb_trace_id__": null // removed
}

This is the post view by the account administrator and campaign:

WhatIneedtoknow:

  • WhydoesFacebookreturnmethepost_reactionfieldwith205andontheFacebookpageIhave150or160reactions?Thisdivergenceoccurswithotherfieldsaswell.

Notes

  
  • I'mnotusinganySDK
  •   
  • MyadgrouphasonlyONEadandonlyUMAcampaign(thisoneIammakingrequestsfor)
  •   
  • Therequestandcampaignwereviewedatthesametime,andthecampaignisoldenough(July10)foranycachetobeupdated;thecampaignisalsoinactiveafewdaysago
  •   
  • IknowthattheAdsManagerbringssomeAPIvaluesandthattherethevaluesareexactlythesame,butinthiscasetheManagerdoesnothavethelikes,commentsorpost_reactions,only"Total Actions", a field that will be removed (the Ads manager itself uses version 2.11)
  •   
  • I accept responses in different programming languages, SDKs or just URL's get or post, because my problem is about understanding how this query works (or am doing something wrong) and not about implementing specifically.
  •   
    
asked by anonymous 31.07.2018 / 22:19

0 answers