fbSimPosts: Show posts of a public Facebook page and stores some...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/fbSimPosts.R

Description

Show posts of a public Facebook page, by returning a data frame in which are collected the text of the post, the unique identifier, an indicator of whether the post is pinned or not, number of reactions, likes, shares, and comments. The function needs a valid profile Chrome folder (see fbSetAccount for more information)

Usage

1
2
fbSimPosts(page_id, user_path, n_posts = 25, timeout = c(3, 6),
  chrome_ver = 77)

Arguments

page_id

The public Fb page to be shown.

user_path

The location of the profile folder (folder name included).

n_posts

The number of posts to be shown (from the most recent to the oldest)

timeout

The system timeout between a browser action and the other. Default is c(3, 6), namely a random time between 3 and 6 seconds.

chrome_ver

The installed version of Google Chrome. To get the Chrome version go to chrome://version in Chrome's address bar and use the first two digits - e.g. if the version is 73.0.3683.86, just use 73).

Value

A dataframe with information on public posts.

Author(s)

Moreno Mancosu moreno.mancosu@carloalberto.org, Federico Vegetti vegetti.fede@gmail.com

See Also

setFbAccount

Examples

1
2
3
page_id <- "116716651695782" #Silvio Berlusconi's official page ID
user_path <- "C:/Users/Username/Desktop/Chrome_profile"
data <- fbSimPosts(user_path, page_id, n_posts = 10)

morenomancosu/fbSim documentation built on Oct. 28, 2020, 3:41 a.m.