Romain Francois, Professional R Enthusiast

To content | To menu | To search

Tag - facebook

Entries feed - Comments feed

Sunday, January 15 2012

Crawling facebook with R


So, let's crawl some data out of facebook using R. Don't get too excited though, this is just a weekend whatif project. Anyway, so for example, I want to download some photos where I'm tagged.

First, we need an access token from facebook. I don't know how to get this programmatically, so let's get one manually, log on to facebook and then go to the Graph API Explorer

graph_api_explorer.png

Grab the access token and save it into a variable in R

access_token <- "************..."

Now we need to study the graph api to figure out the url we need to build to do what we want to do, e.g. here we want "me/photos". I've wrapped this into an R function:

And then we can use it:

That's it, I told you it was not that exciting, but it was still worth playing with ...

Blogroll:


Thursday, September 22 2011

Facebook page about the Graph Gallery

I've just created a facebook page about the R Graph Gallery

I hope this will improve the experience of the website by making it more social, for example, I anticipate that people will share their own graphs by sending a picture on the facebook page wall

As part of this, I've added the usual "find us on facebook" widget on the home page of the gallery

facebook_page.png