getUsersBatch: Returns user data for a vector of Twitter user IDs or...

Description Usage Arguments Author(s) Examples

View source: R/get-users-batch.R

Description

getUsersBatch connects to the REST API of Twitter and returns user objects (user information) for Twitter users, based on their screen names or user IDs

Usage

1
2
getUsersBatch(ids = NULL, screen_names = NULL, oauth,
  include_entities = "false", verbose = TRUE, output = NULL)

Arguments

ids

ids of Twitter users

screen_names

user names of the Twitter users

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.

include_entities

if "true", returned data will include most recent tweet

verbose

shows additional ouput about token usage in console

output

If not NULL, will write user data in raw JSON format to that file

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 user data for users "p_barbera" and "barackobama"
 userdata <- getUsersBatch(screen_names=c("p_barbera", "BarackObama"),
   oauth=my_oauth)

## End(Not run)

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