-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlinedin.R
More file actions
27 lines (25 loc) · 881 Bytes
/
linedin.R
File metadata and controls
27 lines (25 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
require(devtools)
#install_github("mpiccirilli/Rlinkedin")
require(Rlinkedin)
#in.auth <- inOAuth()
app_name <- "codecamp"
consumer_key <- "7821c7xgkd70mh"
consumer_secret <- "HGndfOcno5xCXmQW"
in.auth <- inOAuth(app_name, consumer_key, consumer_secret)
my.profile <- getProfile(in.auth)
my.profile
sapply(my.profile, function(x) names(x))
df1 <- data.frame(t(sapply(my.profile, function(x){
x[c("fname", "lname", "location")]})))
search.company <- searchCompanies(in.auth, "Cisco")
length(search.company)
sapply(search.company, function(x) names(x))
df2 <- data.frame(t(sapply(search.company, function(x){
x[c("company_name", "website", "employee_count")]
})))
df2
search.comp <- searchCompanies(in.auth, keywords = "LinkedIn")
df3 <- data.frame(t(sapply(search.comp, function(x){
x[c("company_id", "company_name", "universal_name", "website", "num_followers")]
})))
df3