Professional Documents
Culture Documents
Praveen Kumar D
Research Scholar
Department of Computer Science & Engineering
YSREC of Yogi Vemana University, Proddatur
Kadapa Dt., A. P, India
1 Introduction
2 Get permissions from facebook
3 Extract Facebook user details with R
4 Update Facebook status with R
5 Extract list of likes of a Facebook friend
6 Search a Group in Facebook with R
7 Search pages that mention a string
8 Extract Recent Posts from the Authenticated users newsfeed
9 Extract a post details
10 Extract List of Friends with their Information
11 Extract Facebook Picture of Authenticated User
12 Other Functions in Rfacebook Package
Requirements
https://developers.facebook.com/tools/explorer
getUsers()
Definition
getUsers() retrieves public information about one or more
Facebook users and private information of the main User.
After version 2.0 of the Facebook API, only id, name, and
picture are available through the API. All the remaining fields
will be missing.
Syntax: getUsers(users, token, private info = FALSE)
It extract information like User Id, name, username, first name,
middle name, last name, gender, locale, category, likes, picture
If we provide private info as TRUE, along with above details
it provides birthday , Location, hometown, relationship status etc
Yogi Vemana University, Proddatur, Kadapa
Facebook Data Analytics using R
July 29, 2016 Slide: 14 / 41
Outline Introduction Permissions User Details Status Likes Groups Pages NewsFeed Posts Friends Picture Others
updateStatus()
Definition
updateStatus() sends a status update that will be displayed on the
Facebook profile of the authenticated user.
link="https://www.youtube.com/
watch?v=Fa9gghVBlk4"
updateStatus(text,fb oauth,
link)
getLikes()
Definition
getLikes() retrieves information about a friends likes. To retrieve
the number of likes for a page
table(likes)
searchGroup()
Definition
Use searchGroup() in combination with getGroup to scrape public
posts on Facebook groups.
getGroup()
Definition
getGroup() retrieves information from a public Facebook group.
searchPages()
Definition
searchPages()retrieves public pages that mention a given keyword
website: http://www.isro.gov.in
getPage()
Definition
getPage() retrieves information from a public Facebook page. Note
that information about users that have turned on the follow
option on their profile can also be retrieved with this function
pdetails # printing
getNewsfeed()
Definition
getNewsfeed() retrieves status updates from the authenticated
users News Feed
Syntax: getNewsfeed(token, n)
From above token means Access token (Must be the extended
access token) and n indicates number of maximum posts
retrieve.
This method gives output as "from id", "from name",
"to id", "to name", "message" , "created time",
"type", "link", "id" , "likes count",
"comments count", "shares count"
Yogi Vemana University, Proddatur, Kadapa
Facebook Data Analytics using R
July 29, 2016 Slide: 30 / 41
Outline Introduction Permissions User Details Status Likes Groups Pages NewsFeed Posts Friends Picture Others
getPost()
Definition
getPost() retrieves information about a public Facebook post,
including list of comments and likes.
Postdetails # printing
getFriends()
Definition
getFriends() retrieves information about the users friends.
thank You