Skip to contents

Collects the 800 most recent bookmarked tweets of a user.

Usage

user_bookmarks(
  id,
  n = 100,
  ...,
  expansions = NULL,
  fields = NULL,
  parse = TRUE,
  token = NULL,
  verbose = FALSE
)

Arguments

id

Twitter user id: character string identifying your account.

n

Number of tweets to retrieve.

...

Other arguments passed down to the API.

expansions

Set NULL to not use any expansion, set NA to get all expansions, or provide a vector with the expansions you want (create it with set_expansions()).

fields

Set NULL to not use any field, get all allowed fields with NA, provide a list with the fields you want (create it with set_fields()).

parse

If TRUE, the default, returns a tidy data frame. Use FALSE to return the "raw" list corresponding to the JSON returned from the Twitter API.

token

This endpoint only accept a OAuth2.0 authentication (can be created via rtweet_oauth2()).

verbose

A logical value

Value

A data.frame with the user information of who is following the list: edit_history_tweet_ids, id and text. Other information depends on the expansions and fields requested. Accepted values are:

  • Expansions: set_expansions(list = NULL).

  • Fields: set_fields(list = NULL).

Note

This endpoint requires a OAuth2.0 authentication, with tweet.read, users.read and bookmark.read permissions.

Examples

if (FALSE) {
   # Requires token_oa2
   ub <- user_bookmarks(user_self()$id, parse = FALSE, n = Inf, token = token_oa2)
}