-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete all your tweets using rtweet | Julia Silge #78
Comments
Wonderful. |
@myaseen208 You'll want to get a list of all your favorites/likes (here is some advice on how to do this), and then iterate through using |
Thanks for this, I cleaned up a bit my timeline with a slightly different script. library(jsonlite)
library(data.table)
library(rtweet)
auth_setup_default()
tweets <- as.data.table(
fromJSON(paste(sub("window.YTD.like.part0 = ", "", readLines("data/tweets.js")), collapse = ""))[["tweet"]]
)[
j = created_at := as.POSIXct(created_at, format = "%a %b %d %H:%M:%S %z %Y")
][
created_at <= as.POSIXct(Sys.Date() - 30)
][
order(created_at)
][
j = list(list(try(post_destroy(id)))),
by = id
]
likes <- as.data.table(
fromJSON(paste(sub("window.YTD.like.part0 = ", "", readLines("data/like.js")), collapse = ""))[["like"]]
)[
j = list(list(try(post_favorite(status_id = tweetId, destroy = TRUE)))),
by = tweetId
] |
@mcanouil, thanks for very concise R code. However, the last likes part throws the following error: |
404 is "not found" which can occur when the tweet was already deleted. |
Thank you for sharing this info! Do you have a recommendation for other apps or social networks that data science and rstats folks are using? |
@michaellomuscio I don't know what will happen in the long run or where folks will land eventually. I've actually been seeing more nice discussion on LinkedIn 😱 lately, and a lot of data science folks have exited Twitter for Mastodon, especially Fosstodon. |
HI julia , I would really appreciate if you can just do an article on such aspects mentioned aspects of the package "pins" or probably if there is any other alternatives / packages that should be better tailored for the above mentioned tasks. Your input is highly appreciated |
Can you create a reprex (a minimal reproducible example) for your problem? The goal of a reprex is to make it easier for us to recreate your problem so that we can understand it and/or fix it. If you've never heard of a reprex before, you may want to start with the tidyverse.org help page. Once you have a reprex, I recommend posting on the pins GitHub repo, which is a great place for getting help with these kinds of pins questions. We talk about file size recommendations in this section. Thanks! 🙌 |
Delete all your tweets using rtweet | Julia Silge
A data science blog
https://juliasilge.com/blog/delete-tweets/
The text was updated successfully, but these errors were encountered: