Note: this function is DEPRECATED and will be removed in a future release. Please use the Collect function
Collect data from Facebook pages for generating different types of networks
character string, specifying the name of the Facebook page.
For example, if page is: https://www.facebook.com/StarWars, then
character string, specifying a 'start date' for data
collection, in the format YYYY-MM-DD. For example, to collect data starting
from July 4th 2015,
character string, specifying an 'end date' for data
collection, in the format YYYY-MM-DD. For example, to collect data until
December 25th 2015,
numeric, maximum number of comments and likes to return (see
This function collects data from Facebook pages (i.e. post data and
comments/likes data within posts), and structures the data into a data frame
dataSource.facebook, ready for creating networks for further
CollectDataFacebook collects public 'post' data from a given Facebook
page, including comments and 'likes' from within each post.
The function then finds and maps the edgeTypes between users and posts,
and structures these relationships into a format suitable for creating
bimodal networks using
A date range must be specified for collecting post data using
rangeTo (i.e. data will be collected from posts
posted within the date range). If no date range is supplied, then the
default is the current system date minus one week (i.e. 7 days leading up to
current system date).
A data frame object of class
dataSource.facebook that can be
Currently supported network types:
- bimodal networks - dynamic networks
Note: dynamic networks created using Facebook data are bimodal. This means that there are two types of vertices present in the network (i.e. Facebook users and Facebook posts), with edges representing the time(s) when user i commented on post j. Currently, timestamp data is not available through the Facebook API for 'likes' data (i.e. when user i 'likes' post j), so edge ties based on 'likes' are excluded from dynamic Facebook data.
Timothy Graham <email@example.com> & Robert Ackland <firstname.lastname@example.org>
Authenticate must be run first or no data
will be collected.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
## Not run: ## Use your own values for myAppID and myAppSecret appID <- "xxxx" appSecret <- "yyyy" ## Collect data and create bimodal network g_bimodal_facebook_star_wars <- Authenticate("Facebook", appID = appID, appSecret = appSecret) %>% SaveCredential("FBCredential.RDS") %>% Collect(pageName="StarWars", rangeFrom="2015-03-01", rangeTo="2015-03-02", writeToFile=FALSE) %>% Create("Bimodal") ## Create a dynamic network using the saved credentials g_bimodal_facebook_star_wars_dynamic <- LoadCredential("FBCredential.RDS") %>% Collect(pageName="StarWars", rangeFrom="2015-03-01", rangeTo="2015-03-02", writeToFile=FALSE) %>% Create("dynamic") ## End(Not run)
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.