cis-ds/course-site

Fix day 1 rtweet example

Closed this issue · 2 comments

Twitter API is janky. Already corrected in the slides. Just need to fix the notes.

Also replace exercise on API week.

Day 1 example has been fixed. Need to revise the exercise code to use the newest version of rtweet.

  • Add instructions to install rtweet from GitHub directly for new authentication protocol
  • Use following code to store/retrieve authentication token
# authenticate interactively with bearer token from my Twitter app
auth <- rtweet_app()

# store token
auth_save(auth, "some-name")

# retrieve stored token
auth_as("some-name")
  • Securely share the bearer token with the class so it doesn't get me banned from Twitter API
  • Adjust exercise to not require group_by(screen_name) since that is not automatically included in the API results