A member suggested me having a Twitter bot sharing new topics. Had someone done this?
AI-generated summary
The discussion revolves around creating a Twitter bot to promote new topics on a Discourse community. Federico_Tomassetti initiates the conversation, asking if anyone has already built such a bot. nexo suggests using dlvr.it, while simon proposes Zapier, providing links to relevant templates and guides. D8vid shares that they are developing a custom Python bot using the Discourse and Tweepy APIs, with support for filtering topics by author and handling media, including thumbnails. They invite testing volunteers and have released the bot on GitHub, with updates noted in the repository README.
Use dlvr.it and it’ll share new topics and replies.
Does divlrt.it works with discourse out of the box?
You could also look at using Zapier for this. There is a prebuild Zapier template for publishing Discourse posts to Twitter. If you would like finer control of what posts get published, you can create your own Zap. For details see:
Zapier unfortunately doesn’t support @mentions, although Twitter’s guidelines allows them in specific use cases, and it doesn’t yet support the new thumbnails feature in Core.
So, I’m writing my own in Python using:
Testing & debugging is ongoing at a bootstrapping Discourse (not very active).
I’d be happy for testing volunteers.
All the showstoppers are fixed to my knowledge, so
https://github.com/d8vid/discourse-new-topic-tweetbot
From the README:
Intended to run as a daemon on the host running Discourse, the bot polls Discourse’s latest topics (latest.json) then tweets new topics matching your criteria to your registered Twitter feed (see Customizations, below).
Next change, restrict tweeting to topics posted only by a specified list of Discourse users.
The bot was refactored, a tweet queue added, and the git head reset (due to some site-specific bits that were left in). If you pulled from this repo, wipe it & pull again (keeping your settings.ini file).
In order to use a Discourse thumbnail as a Tweet media inclusion, when the bot finds a new topic it waits for a TOPIC_REFRESH_INTERVAL then refreshes the newest topic in its queue before tweeting it.