This little go project to allow a team of moderators to post a link with a "community" user.
We need TWO Reddit apps:
-
One web app to authenticate mods
-
One script app to submit, the developer must be the "community" user.
-
Create an
.env
config viacp .env.template .env
-
Edit
.env
config with:SUBREDDIT=
your subredditLOGLEVEL=
as you wish (2 = Error, 4 = Info, 5 = Debug)USERAGENT=
User Anget of your app (Reddit wants it)R_CLIENT_ID=
the script application ID (something likeabcd0efgh12345
)R_CLIENT_SECRET=
the script application secret (usually longer then the ID)R_USERNAME=
the username of your "community" userR_PASSWORD=
the password of your "community" userO_CLIENT_ID=
the web application IDO_CLIENT_SECRET=
the web application secretO_HOST=
the base url for your web application
Note: the redirect uri
configured in Reddit must be O_HOST
+ \callback
That's it,
now every moderator of SUBREDDIT
with "mail" permission (or "all" permission),
can use the interface to post as R_USERNAME
.
git clone https://github.com/timendum/notiziabot.git
cd notiziabot
go install
go build
./notiziabot
Then expose to the internet port 3000 via Nginx, Apache, Caddy or similar.