Retreiving and analyzing Facebook data with R

network_plotAs suggested by Julianhi’s Blog post, I installed the CRAN Rfacebook package for the R statistical environment and I created a sample igraph with 20 of my “facebook friends”

## See examples for fbOAuth to know how token was created.

## Getting my network of friends

load(“fb_oauth”)

mat <- getNetwork(token=fb_oauth, format=”adj.matrix”)

library(igraph)

network <- graph.adjacency(mat, mode=”undirected”)

pdf(“network_plot.pdf”)

plot(network)

dev.off()