cjbarrie/academictwitteR

Error in check_bearer

dagiseo opened this issue · 1 comments

Hi!

I'm trying to use the get_liked_tweets function, but I got stuck. This is the issue that comes up:

Error in check_bearer(bearer_token) : 
  could not find function "check_bearer"
Called from: get_user_edges(x, bearer_token, wt = "liked_tweets") 

This is the code I have:

`get_bearer <- function() {
  bearer_token <- Sys.getenv('TWITTER_BEARER')
  if (identical(bearer_token, "")) {
    stop("Please set envvar TWITTER_BEARER or supply your bearer token in every call. See ?get_bearer for more information.", call. = FALSE)
  }
  return(bearer_token)
}

get_liked_tweets(users, bearer_token)

get_liked_tweets <- function(x, bearer_token = get_bearer()){
  get_user_edges(x, bearer_token, wt = "liked_tweets")
}`

Get_all_tweets seems to work just fine, I am also using the developing package. I am using Windows 10. Not really sure what the issue is.

Thanks in advance!
And thanks for the amazing package!

Hey! Is this still an issue? Follow the guidelines in the README to set bearer token and this should work okay