Learn R Programming

smappR (version 0.5)

getRetweets: Returns the list of user IDs that retweeted a specific tweet.

Description

getRetweets connects to the REST API of Twitter and returns a list of up to 100 user IDs belonging to users who have retweeted the tweet specified by the id parameter.

Usage

getRetweets(id = NULL, oauth_folder, cursor = -1, verbose = TRUE, sleep = 1)

Arguments

id
The numerical ID of the desired status
oauth_folder
folder where OAuth tokens are stored.
verbose
If TRUE, prints information about API calls on console
sleep
Number of seconds to sleep between API calls.

Examples

Run this code
## Not run: 
# ## Download list of recent user IDs retweeting a tweet by Hillary Clinton
#  rts <- getRetweets(id='653733796408377344', oauth_folder="~/credentials/twitter")
# ## End(Not run)

Run the code above in your browser using DataLab