0

I was creating an application to get insights into business and creator accounts. But when I was trying out to get insights of an account using business discovery, I was receiving the error

{
  "error": {
    "message": "(#100) For field 'insights': The parameter metric is required",
    "type": "OAuthException",
    "code": 100,
    "fbtrace_id": "A_VNXOMovZwvUpzUFVF5y87"
  }
}

The query I fetched was ?fields=business_discovery.username(google){insights{impressions}}

I know how can I fetch insights data for my account /insights?metric=impressions&period=day. But I cannot understand, how can I give the period argument in that previous query?

2 Answers2

1

Business discovery cannot get insight data. You should use insight api instead.

Here's a simple account insight fyr 17841403823915540/insights/?metric=follower_count,reach,impressions&period=day&since2021-01-11&until=2021-01-18

And you will get sth like:

{
  "data": [
    {
      "name": "follower_count",
      "period": "day",
      "values": [
        {
          "value": 0,
          "end_time": "2021-01-16T08:00:00+0000"
},
Charith Jayasanka
  • 4,033
  • 31
  • 42
Sum Chan
  • 31
  • 1
  • How to get other page's insights data? I think based on instagram develop docs it could be possible. – mtf Mar 12 '22 at 08:53
0

It is not possible to query insights of other instagram accounts with insights or business_discovery endpoint. I have come to conclusion that you have to use business_discovery endpoint together with media edge and calculate insights yourself.

magino
  • 109
  • 9