{"id":23786598,"url":"https://github.com/seabbs/stacktweetbot","last_synced_at":"2026-04-14T03:30:18.283Z","repository":{"id":99745305,"uuid":"120895917","full_name":"seabbs/StackTweetBot","owner":"seabbs","description":"Tools for quickly and easily creating twitter StackOverflow bots","archived":false,"fork":false,"pushed_at":"2018-10-24T15:58:56.000Z","size":120,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-16T13:02:42.516Z","etag":null,"topics":["bot","r","rpackage","rstats","stackoverflow","stackoverflow-questions","twitter"],"latest_commit_sha":null,"homepage":"https://www.samabbott.co.uk/StackTweetBot/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seabbs.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-09T11:07:55.000Z","updated_at":"2018-10-24T15:58:57.000Z","dependencies_parsed_at":"2023-07-31T19:45:51.397Z","dependency_job_id":null,"html_url":"https://github.com/seabbs/StackTweetBot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seabbs%2FStackTweetBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seabbs%2FStackTweetBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seabbs%2FStackTweetBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seabbs%2FStackTweetBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seabbs","download_url":"https://codeload.github.com/seabbs/StackTweetBot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240002228,"owners_count":19732165,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","r","rpackage","rstats","stackoverflow","stackoverflow-questions","twitter"],"created_at":"2025-01-01T14:27:21.519Z","updated_at":"2026-04-14T03:30:18.246Z","avatar_url":"https://github.com/seabbs.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figure/\"\n)\n```\n\n# Tools to Make a Stack Overflow Twitter Bot\n\n  [![lifecycle](https://img.shields.io/badge/lifecycle-stable-green.svg)](https://www.tidyverse.org/lifecycle/#stable)\n  [![Travis build status](https://travis-ci.org/seabbs/StackTweetBot.svg?branch=master)](https://travis-ci.org/seabbs/StackTweetBot)\n[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/fxe1jxdykm5hvn1m?svg=true)](https://ci.appveyor.com/project/seabbs/stacktweetbot)\n  [![Coverage status](https://codecov.io/gh/seabbs/StackTweetBot/branch/master/graph/badge.svg)](https://codecov.io/github/seabbs/StackTweetBot?branch=master)\n\nThe aim of this package is to allow for easy creation of Stack Overflow twitter bots. It provides a wrapper around functionality from [`rtweet`](http://rtweet.info/) and [`stackr`](https://github.com/dgrtwo/stackr). It was inspired by the [tidyverse tweets bot](https://github.com/wjakethompson/tidyverse-tweets/blob/master/tidyversetweets.R) by [Jake Thompson](https://www.wjakethompson.com/), from which large amounts of code has been adapted. For a working example of a bot built with this package see [h2o tweets bot](https://twitter.com/h2o_tweets), or [here](https://github.com/seabbs/h2o_tweets) for the code.\n\n## Installation\n\nInstall the development version from GitHub:\n\n```{r gh-installation, eval = FALSE}\n# install.packages(\"devtools\")\ndevtools::install_github(\"seabbs/StackTweetBot\")\n```\n\nTo schedule the bot you will either need to install `cronR` (if on Linux or Mac) with, \n\n```{r, eval = FALSE}\ninstall.packages(\"cronR\")\n```\n\nor taskscheduler (if on windows) with,\n\n```{r, eval = FALSE}\ninstall.packages(\"taskscheduleR\")\n```\n\n## Quick start\n\n1. Load the package\n\n```{r load-package}\nlibrary(StackTweetBot)\n```\n\n2. Set up your bots [Twitter](https://twitter.com/) account - making it clear it is a bot!\n\n3. Set up access to the Twitter API with, \n\n```{r set-up-twitter}\nadd_twitter_api()\n```\n\n4. Set up access to the Stack Overflow API. This is required to increase your daily rate limit from 300 to 10,000.\n\n```{r set-up-stack}\nadd_stack_api()\n```\n\n5. Check you have correctly set up your API access (restart your r session first).\n\n```{r check-api, eval = FALSE}\nadd_twitter_api()\nadd_stack_api()\n```\n\n5. Set up and schedule the twitter bot, settting the tags to look for and to exclude. Schedule the bot using `schedule = TRUE`, with the arguements to use to define the update time being platform dependent, see `?set_up_stack_tweet_bot` for details. To allow posting set `post = TRUE`, and to save the bot to a permanent directory (so that it will run after your R session has ended) set the directory with `dir`.\n\n```{r schedule-twitter-bot}\nset_up_stack_tweet_bot(extracted_tags = \"ggplot2\",\n                       excluded_tags = \"python\",\n                       time_window = 60,\n                       add_process_fn = NULL, \n                       hashtags = \"rstats\",\n                       run = TRUE, \n                       schedule = FALSE,\n                       save = TRUE, \n                       post = FALSE,\n                       dir = NULL,\n                       verbose = TRUE,\n                       frequency = \"hourly\")\n```\n\n6. Check your bot is running.\n\n```{r, eval = FALSE}\n## If using cronR on mac or linux\ncronR::cron_ls()\n## If using taskscheduleR on windows\ntaskscheduleR::taskscheduler_ls()\n```\n\n## Additional Functionality\n\nFile an issue [here](https://github.com/seabbs/StackTweetBot/issues) if there is a feature, that you think is missing from the package, or better yet submit a pull request!\n\n## Docker\n\nThis package has been developed in docker based on the `rocker/tidyverse` image, to access the  development environment enter the following at the command line (with an active docker daemon running),\n\n```{bash, eval = FALSE}\ndocker pull seabbs/stacktweetbot\ndocker run -d -p 8787:8787 -p 1410:1410 -e USER=StackTweetBot -e PASSWORD=StackTweetBot --name StackTweetBot seabbs/stacktweetbot\n```\n\nThe rstudio client can be accessed on port `8787` at `localhost` (or your machines ip). The default username isStackTweetBot and the default password is StackTweetBot. The docker file comes reloaded with `cronR` and therefore may also be used as a staging environment for your twitter bot. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseabbs%2Fstacktweetbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseabbs%2Fstacktweetbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseabbs%2Fstacktweetbot/lists"}