Do more with information available from your Facebook friends – birthday, location, profile picture and relationship status with R Language. We can use various methods for the same result, like (i) Facebook query, i.e. Graph API and use the SDKs and process using some data visualization Javascript or (ii) Processing data with R Language after retrieval with OAuth. The second method is better when we are trying to Analyze and Visualize Facebook Friends’ Data with R as by default; we can do something more with Friend’s data without their permission.
Analyze and Visualize Facebook Friends’ Data with R
There are couple of packages available which is nicely maintained and has documentation :
1 2 3 | http://cran.r-project.org/web/packages/Rfacebook/index.html # you will need rook too http://cran.us.r-project.org/web/packages/Rook/index.html |
First get an access token for the connection by creating œGet Access Token by visiting this URL, use API version use œUnversioned :
---
1 | https://developers.facebook.com/tools/explorer |
As Rfacebook is a Ruby Gem :
1 | https://rubygems.org/gems/rfacebook |
You can use your existing knowledge of Ruby :
1 2 3 4 5 | gem install -l path/to/rfacebook.gem # why? # because # gem install rfacebook # can throw error |
Yes it works nicely, but has problems.
Analyze and Visualize Facebook Friends’ Data without R
Do not forget that OS X Calendar App also fails to retrieve data of Friends! Well, while you might love the above method, but possibly creating custom web application has problems. Possibly, reprocessing of data creates conflict and it is probably not a way which Facebook wants.
It is possible to abuse and Facebook Platform probably drops an authenticated session. So, it probably better to create custom application in this way :
1 | https://github.com/tiepologian/neo4j-facebook-example |
There are lot of nice applications :
1 | https://github.com/search?p=1&q=facebook+visualization&ref=searchresults&type=Repositories |