getList: Returns the list of users added to a Twitter list

Description Usage Arguments Author(s) Examples

View source: R/get-list.R

Description

getList connects to the REST API of Twitter and returns a data frame with information about users included in a Twitter list

Usage

1
getList(list_name, screen_name, oauth, cursor = -1)

Arguments

list_name

name of the list

screen_name

user that created the list

oauth

One of the following: either a list with details for an access token (see example below), a folder where OAuth tokens are stored, or a csv file with the format: consumer_key, consumer_secret, access_token, access_token_secret.

cursor

See https://dev.twitter.com/docs/api/1.1/get/lists/members

Author(s)

Pablo Barbera P.Barbera@lse.ac.uk

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
## Creating OAuth token
 my_oauth <- list(consumer_key = "CONSUMER_KEY",
   consumer_secret = "CONSUMER_SECRET",
   access_token="ACCESS_TOKEN",
   access_token_secret = "ACCESS_TOKEN_SECRET")
## Download Twitter list of "official-twitter-accts" created by @twitter
 accts <- getList(list_name="official-twitter-accts" screen_name="twitter",
   oauth=my_oauth)

## End(Not run)

lingeringcode/tweetscoresmod documentation built on Feb. 18, 2020, 5:28 p.m.