Browse Source

Remove: RFacebook (we will not scrape FB)

janwey 1 year ago
5 changed files with 0 additions and 80 deletions
  1. 0
  2. 0
  3. BIN
  4. 0
  5. 0

+ 0
- 30
collecto.R View File

@@ -11,10 +11,6 @@ install.packages("twitteR")
# had to install "httr" via packagemanager

#### Facebook

#### Fediverse (eg: mastodon)
# requires libssl-dev
@@ -160,32 +156,6 @@ twitter <- within(data = twitter, expr = {
# }}}

## Facebook Collector [WIP] {{{ ----

# Note -------------------------------------------------------------------------
# I was not able to get API Keys for Facebook, thus this package is useless.
# I may look into HTML webscraping, if time allows for this
# ------------------------------------------------------------------------------

### Authenticate to Facebook
#### Manual input (uncomment if needed)
#facebook_app_id <- readline("[Twitter] Enter your App ID key.")
#facebook_secret <- readline("[Twitter] Enter your App Secret.")
#### Saved credentials
#facebook_api_cred <- read.table(file = "./facebook_api.txt", header = TRUE, sep = ";")
#facebook_app_id <- as.character(facebook_api_cred$app_id)
#facebook_secret <- as.character(facebook_api_cred$app_secret)

#facebook_auth <- fbOAuth(app_id = facebook_api_id,
# app_secret = facebook_secret)

### Get posts from FSFE
#facebook_fsfe_posts <- Rfacebook::getPage(page = "thefsfe",
# token = facebook_auth,
# since = "2018-01-01",
# until = "2018-31-12")
# }}}

## Mastodon Collector {{{ ----

### Authenticate to the Fediverse (here: Mastodon)

+ 0
- 44
docs/ View File

@@ -5,7 +5,6 @@
* [General information about the Script](#the-script)
* [Packages used and the Package section](#packages)
* [The twittR package](#the-twitter-package)
* [The Rfacebook package](#the-rfacebook-package)
* [The Mastodon package](#the-mastodon-package)
* [Collecting from Twitter](#twitter)
* [Collecting from the Fediverse](#fediverse)
@@ -39,7 +38,6 @@ As of writing this script and its documentation, three scraper-packages are
being used:

* [twitteR]( (Version 1.1.9)
* [Rfacebook]( (Version 0.6.15)
* [mastodon]( (Commit [a6815b6](

### The twitteR package
@@ -62,48 +60,6 @@ dependency of twitteR - from the Repositories of my distribution of choice, as
the one provided by CRAN would not compile for some reason. So if you run into a
similar issue, look for something like `r-cran-httr` in your packagemanager.

### The Rfacebook package
I tried to set up a facebook account just for this purpose, but their
registration process is rather tedious and honestly ridiculous. Keep your phone
number or credit card nearby, as well as a photo of your face. I can not accept
these kinds of intrusion, even for the purpose of this data-analysis. If you
already have a facebook-account, you can however use that one to receive the API
access tokens and use the *Rfacebook* package described in this section. I did
not, so the process described here is potential and I do actually know the
structure of each function's output._

[documents its internal and external functions](
fairly well, too. The focus of the package does not quite align with the purpose
we have in mind here (concentration on metrics for site-administrators and
analyzing specific people's actions), however caused by a lack of alternatives
we can still use it to some extend.
Unfortunately, the functions of this package have very generic names and thus
may conflict with functions from other packages. Here is a little tip to prevent
the usage of the wrong function in R:
Prefix the function you want to use with the name of the package and a double
colon. In the case of the `getShares()` function, this would result in
`Rfacebook::getShares()`. The functions we are interested in and will be
discussed later on as well are:
fbOAuth() # authentication / generating an auth-token
getCommentReplies() # replies to a comment on a post
getGroup() # retrieve information from a public group
getPage() # retrieve information from a public page
getPost() # retrieve information from a public post (incl. comments)
getReactions() # retrieve reactions to a single or multiple posts
getShares() # retrieve list of shares of a post
getUsers() # retrieve information about poster
searchFacebook() # search public posts with a certain string [deprecated]
searchPages() # search public pages that mention a certain string
As a site-note; I had to install the
[httr-package]( - a
dependency of Rfacebook - from the Repositories of my distribution of choice, as
the one provided by CRAN would not compile for some reason. So if you run into a
similar issue, look for something like `r-cran-httr` in your packagemanager.

### The mastodon package
The good thing about Mastodon is, that searches are not restricted to a single
Mastodon-Instance or to Mastodon at all. If your Instance has enough outbound

docs/collector.pdf View File

+ 0
- 2
examples/facebook_api_example.txt View File

@@ -1,2 +0,0 @@

+ 0
- 4
facebook_projects.csv View File

@@ -1,4 +0,0 @@
Free Software Foundation Europe,thefsfe
Mozilla Firefox,Firefox
Mozilla Thunderbird,Thunderbird