functions for automating Facebook API access
You will have to create a Facebook App and use it to connect to the API. Instructions are here.
Functions are built using RFacebook package.
After the initial setup, harvesting data should be a single call:
page_data <- get.facebook.page( page_id, since = '2017/01/01', until = '2017/04/24', get_comments = T, get_replies = T, oauth_token = fb_oauth )