Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Splitting organic and paid impressions in facebook api using R

I am using the Rfacebook package to retreive total impressions a facebookpost had. This works fine, however, this method does not split paid and organic impressions. I use the following code:

getInsights(object_id="post_id", token= token, metric='post_impressions')

Does anyone know how I can differentiate between organic and paid impressions/reach?

like image 673
nemja Avatar asked Mar 01 '18 13:03

nemja


1 Answers

See the Facebook Insights API section on Page Post Impressions.

You should be able to pass values for metric as

  • 'post_impressions_paid'
  • 'post_impressions_fan_paid'
  • 'post_impressions_organic'
  • 'post_impressions_viral'
  • 'post_impressions_nonviral'
  • etc...

to retrieve the various measures you need.

metric can also be a character vector which will allow you to retrieve many at once.

like image 106
ruaridhw Avatar answered Nov 05 '22 10:11

ruaridhw