This bot gets trending topics and tweets based on your location.
$ git clone https://github.com/fabiandev/apiai-messenger-twitter-bot.git
$ cd apiai-messenger-twitter-bot
$ cp .env.example .env
$ yarn
Tip: You can use
npm
instead of yarn.
- Import intents and entities from
data/apiai.zip
to api.ai - Create a Facebook app and assign it to a page
- Add the verify token from api.ai and the webhook URL (https://bot.example.tld/webhook) to your Facebook app and select the events
messages
andmessaging_postbacks
- Fill in your credentials in
.env
- Run
yarn start
- Write with your bot through the Facebook page
This app supports deployment to OpenShift out-of-the-box:
- Create an app for Node.js
- Add environment variables from
.env
- Force-push master to the git remote of your OpenShift app
The bot was not submitted for approval yet. If you want to try it out, please leave me a message and I will add you as a tester. Once you have been added, scan the code below in the Facebook Messenger app:
Icon "Robot, twitter icon" by Sneh Roy (Source)
- api.ai for natural language processing
- Express for the server
- twit for the Twitter API