1. Introduction #
Twitter is a popular online news and social networking service where users can post and interact with short messages called “tweets.” If you are looking to deploy your chatbot on Twitter, Floatchat can help you with that. By integrating Floatchat with your Twitter account, users who send you direct messages will be able to engage with your chatbot and receive responses based on the conversational flow you have set up. The chatbot can also provide answers to frequently asked questions it has been trained for.
1.1 Access to Setup #
To access the Twitter setup in Floatchat, follow these steps:
- Navigate to the Configure section in the Floatchat platform.
- Go to Deployments and select Twitter.
- Continue with the setup process by following the instructions provided.
2. Requirements #
To have your chatbot on your Twitter account, you need to have a developer account with the same email address. You can create a developer account by visiting https://apps.twitter.com/. Twitter will verify the purpose of the account and how you plan to use the developer’s API. This verification process typically takes 2-3 days. Once you have created the developer account, you can proceed with the setup.
3. Steps to Configure Twitter as a Channel #
Follow these steps to deploy your chatbot on Twitter using Floatchat:
3.1 Create an app #
Log in to your Twitter developer account and create a Twitter application. Go to Project and Apps -> Overview. You will see a list of projects and apps if any have been created.
Click on “Create App” below standalone apps and set up the app name. Make sure to copy the API Key and API secret key. Then, click on “App Settings.”
3.2 Set appropriate permissions #
In the App Settings, click on “Edit” next to App Permissions and select “Read, Write, and Access direct messages.” Save your changes. It’s important to select “Access direct messages” to enable the chatbot to function along with Read and Write permissions.
3.3 Retrieve the required tokens and keys #
In the Twitter app, navigate to the “Keys and tokens” section and note down the API key, API secret key, Access token, and Access token secret. These details will be needed to set up the chatbot on Floatchat.
3.4 Get account activity API access #
Refer to the documentation provided to apply for the relevant Account Activity API access. You can choose either Premium or Enterprise access. Ensure that the correct access type is set up on the Floatchat portal (Configure -> Deployments -> Twitter).
3.5 Set up the developer environment #
Go to the developer environments page and click on “Set up dev environment” for the Account type – Account Activity API. Name your environment and specify a Twitter app ID to link with the environment. The environment name you choose will serve as your Dev environment label, which needs to be updated on the Floatchat portal as well.
3.6 Allow receiving direct messages #
For your Twitter account, go to the Security section and check the option “Receive Direct Messages from anyone” at the bottom of the page. Save the changes.
3.7 Update details on the Floatchat portal #
Update the following details in the Twitter configuration section under Deploy -> Twitter in Floatchat. Once you have added the necessary information, click on the save button. Your chatbot is now ready to respond to direct messages on Twitter.
– Twitter Admin username (your Twitter Handle)
– Consumer Key (from Step 3)
– Consumer Secret (from Step 3)
– Access Token (from Step 3)
– Access Token Secret (from Step 3)
– Dev Environment Label (from Step 5)
– The appropriate Twitter Account type, namely Premium or Enterprise