#BotMan
Checkout this project live at botman.in.
This project is intended to be a collection of useful bots who assist you in daily works, sort of digital companions. For now, I'm starting with Loki - the facebook messaging bot who will send your messages to all (or the ones you select) the people in your facebook friends' list. Hope to add more soon.
Follow the below steps to install and run Botman on your system.
- Install the following components on your system:
- Node.js version >= v4.3
- npm version 2.x
- Mongodb (preferably v3.2+)
- clone this repo
- Make sure mongodb is running.
cd
to Botman repo folder.- Copy
.env.example
file to.env
and configure the services with your keys (the current ones are borrowed from hackathon-starter project) - Install the dependencies using npm command:
npm install
. - create a screen (or use any other method if you want) using the
screen -S botman
command. - Inside botman screen, start the server using this command:
npm start
. Wait for a few seconds to see it doesn't crash. - Come out of botman screen by pressing
ctrl+a
thend
key. - Add a cron to send messages using
crontab -e
command. Configure it to run every minute:* * * * * /usr/local/bin/node /var/www/botman.in/components/FBMessageCron.js >> /var/logs/FBMessageCron.log
- Done.
Don't want to run through all these steps? I have hosted it for you on botman.in.
Now point your browser to http://localhost:3000/ and click on "Loki - The FB Bot" link. Login into your facebook account using your facebook username and password.
The following macros are available in message body for usage: {firstname}
, {fullname}
.
Use it like: Hey {firstname}! Come check botman.in project. It's amazingly cool! :)
in the message body.
Now choose the friends you want to send the message to, and click on send
button to queue the messages.
The messages are scheduled to be sent at 1 message per minute. Bombarding a lot of messages at once might cause
facebook to stop your messaging service!
Cheers! :)