get_twitter: Get Twitter Timeline

View source: R/get_twitter.R

get_twitterR Documentation

Get Twitter Timeline

Description

Extract 3,200 tweets from a timeline, extract all pictures and save timeline as a .rds file to new folder. Note that this creates a new directory in the current working directory. "~/working_directory/account_analysis/handle/Sys.Date" Imagery search also creates new folders for each year and also a /final_collage/ folder where all images from each year are appended into a single image.

Usage

get_twitter(handle, search_query = NULL)

Arguments

handle

twitter handle without @

search_query

boolean search query (read rtweet::search_tweets() docs for proper formatting)

Details

If search_query is added, function also pulls 18,000 recent tweets matching the query. Mentions are also saved into the .rds file.

Heavily reliant on the rtweet package. Read the package tutorial for how to set up Twitter API authorization.

Examples

## Not run: 
get_twitter("BMWUSA", search_query = "bmw")

## End(Not run)

taylorgrant/twAccount documentation built on March 20, 2022, 7:33 p.m.