lookup_users: Get Twitter users data for given users (user IDs or screen...

Description Usage Arguments Value See Also Examples

View source: R/users.R

Description

Returns data on up to 90,000 Twitter users. To return data on more than 90,000 users, code must be written to iterate through user IDs whilst avoiding rate limits, which reset every 15 minutes.

Usage

1
lookup_users(users, parse = TRUE, token = NULL)

Arguments

users

User id or screen name of target user.

parse

Logical, indicating whether or not to parse return object into data frame(s).

token

OAuth token. By default token = NULL fetches a non-exhausted token from an environment variable. Find instructions on how to create tokens and setup an environment variable in the tokens vignette (in r, send ?tokens to console).

Value

A tibble of users data.

See Also

https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-lookup

Other users: as_screenname, lists_subscribers, search_users, tweets_with_users, users_data

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 

## select one or more twitter users to lookup
users <- c(
  "potus", "hillaryclinton", "realdonaldtrump",
  "fivethirtyeight", "cnn", "espn", "twitter"
)

## get users data
usr_df <- lookup_users(users)

## view users data
usr_df

## view tweet data for these users via tweets_data()
tweets_data(usr_df)


## End(Not run)

rtweet documentation built on Nov. 17, 2017, 5:54 a.m.