The detect loop is a pure R function designed for downloading tweets from the Twitter search API. It can handle several topics ensuring that all of them will be downloaded fairly using a
round-robin philosophy and respecting Twitter API rate-limits.
The progress of this task is reported on the 'topics.json' file which is read or created by this function. This function will try to collect tweets respecting a 'collect_span' window
in minutes, which is defined on the Shiny app and defaults to 60 minutes.
To see more details about the collection algorithm please see epitweetr vignette.
In order to work, this task needs Twitter credentials, which can be set on the Shiny app or using set_twitter_app_auth