5

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?

Daniel Widdis
  • 8,424
  • 13
  • 41
  • 63
nemja
  • 459
  • 4
  • 19

1 Answers1

7

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.

ruaridhw
  • 2,305
  • 8
  • 22
  • This is not an option in the Rfacebook package. How would I go around it and use the facebook api direct (in R)? – nemja Mar 05 '18 at 14:57
  • @nemja why would that not be an option? Looking at the docs, `metric` seems to be a normal string parameter, that you can pass any value you like for ... – CBroe Mar 05 '18 at 15:04
  • You may also need to pass a newer version than 2.3. Try adding the parameter `version=2.12`. If this still doesn't run you would need to formulate the GET request yourself. – ruaridhw Mar 05 '18 at 15:08
  • Thanks for your help @ruaridhw! – nemja Mar 05 '18 at 15:12