Today Social media is a huge source for data. And in 21 century we know the importance of Data. 21 is the age of Data in this business starts from data, business grow from data and business also collapse in the absence of Data, even in this age idea come from data.
Some advantages of Social media information
- Setting goals on the basis of trends
- Knowing about the market from our actual customers
- Feedback of our product
- Generating ideas on the basis of customers
This is the reason which today’s business leaders are more interested in mining Data in comparison to mining the earth.
Now, people are interested in extracting information form Data in comparison to extracting minerals from earth.
Facebook and twitter are giants in the social media industry. Both have a huge amount of live data as well as historical (approx 10 old data).
So today we will learn some tips for extracting information from facebook and twitter.
At first, we will go for facebook then we will also discuss some tips for extracting information from twitter.
Data Extraction from facebook
Facebook is a huge source of live data as well as historical data (approx 10 years old). facebook data also helps us in making business decisions or understanding market trends.
Rfacebook package is used for extracting information from facebook after accessing facebook API functions using R language.
This package provides a series of functions that help us (R developers) to access facebook API and getting these following information
- Users and posts
- Get public information
- Get public page details
And much more information we can be able to collect from facebook.
But before accessing facebook API using Rfacebbok package we need to generate auth token from developer facebook website after which facebook authenticates us for using their API.
So for generating auth token we have to follow these few steps as shown below.
Step 1: Goto this link (After login from your facebook account)
https://developers.facebook.com/tools/explorer
Step 2: Click on generate token Button and your token will be generated. (as shown below)
Now we came to the state where we can be able to extract information from Facebook using Rfacebook package.
So for that, we have to follow these few steps :
Step 1: Install R package
# install Rfacebook package
install.package('Rfacebook')
Step 2: Load package
# load package
library('Rfacebook')
Step 3: Set token
# set tokken
token <- 'after genrating token form facebook developer page paste here'
Now we are ready to extract information from Facebook using Rfacebook package