Returns the 20 most recent Tweets liked by the authenticating or specified user.
get_favorites(user, n = 3000, since_id = NULL, max_id = NULL,
parse = TRUE, token = NULL)
Screen name or user id of target user.
Specifies the number of records to retrieve. Must be less than or equal to 200; defaults to 3000, which is the max number of favorites returned per token. Due to suspended or deleted content, this function may return fewer tweets than the desired (n) number.
Returns results with an status_id greater than (that is, more recent than) the specified status_id. There are limits to the number of tweets returned by the REST API. If the limit is hit, since_id is adjusted (by Twitter) to the oldest ID available.
Returns results with status_id less (older) than or equal to (if hit limit) the specified status_id.
Logical, indicating whether to return parsed
vector or nested list (fromJSON) object. By default,
parse = TRUE
saves you the time [and frustrations]
associated with disentangling the Twitter API return objects.
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).
Tweets data frame.
Other tweets: get_timeline
,
lookup_statuses
,
search_tweets
, stream_tweets
,
tweets_data
# NOT RUN {
# get ids of users following the president of the US
pres <- get_followers(user = "potus")
pres
# get ids of users following the Environmental Protection Agency
epa <- get_followers(user = "epa")
epa
# }
Run the code above in your browser using DataLab