The steps are as follows:
Step 1: installing required libraries to R environment
Step 2: Generating Token Key from Facebook
Step 3: Retrieving Information from Facebook
Step 4: Advance Graphical Representation
â„đ 7737669865 đâ» Bangalore Call-girls in Women Seeking Men đBangaloređ Esc...
Â
Statistical analysis of facebook using r
1. 1 | P a g e
Statistical Analysis of Personal Facebook
Account Details using R
Study Report
01st
October 2015
Sanjaya Ratnayake
sanjurat@yahoo.com
+94 77 2841457
2. 2 | P a g e
1. Introduction
Facebook is an online social networking service and allows a person (at least 13 years old)
in interested in Facebook to become a registered user of this website. Today, Facebook is
the world's largest social network, with more than 1 billion users worldwide.
There are already lots of other ways to communicate online, such as email, instant
messaging, and so on. But still many people like using Facebook. What makes Facebook
unique is the ability to connect and share with the people you care about at the same time.
Today, having a Facebook account is now an expected part of being online, much like having
your own email address. And since Facebook is so popular, other websites are interested in
integrating Facebook to their web sites. This means you can use a single Facebook account
to sign in to different services across the Web.
This site is available in 37 different languages, includes public features such as:
ï· Marketplace - allows members to post, read and respond to classified ads.
ï· Groups - allows members who have common interests to find each other and
interact.
ï· Events - allows members to publicize an event, invite guests and track who plans to
attend.
ï· Pages - allows members to create and promote a public page built around a specific
topic.
ï· Presence technology - allows members to see which contacts are online and chat.
2. Methodology
The steps are as follows:
Step 1: installing required libraries to R environment
Step 2: Generating Token Key from Facebook
Step 3: Retrieving Information from Facebook
Step 4: Advance Graphical Representation of results
3. Configuration of R Libraries
Initially it is required to install six libraries. They are,
RFacebook
httpuv
RColorBrewer
RCurl
rjson
httr
3. 3 | P a g e
For that below code can be used.
Now the required libraries can be imported.
For that below code can be used.
4. Configuration of Facebook
Login to Facebook and navigate to: developers.facebook.com
Go to âTools and Supportâ section and navigate to âGraphic API Explorerâ.
From the âGraphic API Explorerâ Click âGet Tokenâ and select âGet User Access Tokenâ.
4. 4 | P a g e
Then select all permissions, under âUser Data Permissionâ and âExtended Permissionâ and
click âGet Access Tokenâ.
5. 5 | P a g e
5. Connecting to Facebook using R
Copy the token key and assign that to a variable in R. In R, it is possible to use below code.
I have assign it to a variable call âtknâ.
6. Retrieving the user details
In order to obtain the user details, getUser() function can be used.
Below code can use. The Token variable need to use as a parameter for it.
7. Retrieving the friends details
For that getFriends() function can be used. The getFriends() return values have assigned to
a variable call myfrds and converted it to a string.
6. 6 | P a g e
8. Retrieving the friends relationship status
For that friend object (in this case myfrds) is required to use relationship_status attribute.
The data are shown in Pie chart and for that pie() function was used.
9. Retrieving the friends locations
For that friend object (in this case myfrds) it is required to user location attribute. The data
are shown in Pie chart and for that pie() function was used as previous.
7. 7 | P a g e
10. Retrieving the friends Gender details
For that friend object (in this case myfrds) it is required to user gender attribute. The data
are shown in Pie chart and for that pie() function was used as previous.