Getting data from Facebook with the Rfacebook package

The Rfacebook package, developed and maintained by Pablo Barberá, lets you easily establish and take advantage of Facebook's API thanks to a series of functions.

As we did for the twitteR package, we are going to establish a connection with the API and retrieve posts pertaining to a given keyword.

Getting ready

This recipe will mainly be based on functions from the Rfacebok package. Therefore, we need to install and load this package in our environment:


How to do it...

  1. In order to leverage an API's functionalities, we first have to create an application in our Facebook profile. Navigating to the following URL will let you create an app (assuming you ...

Get RStudio for R Statistical Computing Cookbook now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.