Disclosure: , powered by APIs, delivered through global infrastructure, has previously sponsored Hacker Noon. PubNub So you want to create a bot to interact with your customers This can be configured and deployed today using PubNub Functions and our . Twitter automatically. Twitter BLOCK A Practical Use Case The uses to intelligently get in touch with your customers in realtime. No more email blasts, no more watching leads, no more delay in communication. The instant a customer signs up for your service, they are classified to determine what their needs will be. The automatically reaches out with specific resources for the customer’s likely use case. Outreach is tailor made for each individual. Open Growth SDK Machine Learning Delight Engine Open Growth sends that personalized introduction via email, text message, Twitter, and even cake 🍰 ! This guide shows how to configure your company’s Twitter account to post automated @tweets to your customers (following the ): docs , or log into an existing one. Sign up for a Twitter account Sign in and go to the , click and fill in all the fields except for . Twitter Application Management Dashboard Create New App Callback URL Click . Create Your Twitter Application Go to the tab an make sure the app’s permissions are set to . Permissions Read and Write Next, you need grant access and get an OAuth token. You can get the consumer keys and generate the tokens on the page by clicking the button. Keys and Access Tokens Create my access token Almost done! You can now use the Twitter BLOCK to Tweet by publishing a PubNub message or REST API call. Test and Debug Besides hitting the button, you can use PIN-based authorization. You can authorize and also debug using , a command line tool like Curl, but tailored for Twitter. If you have Ruby installed, you can install Twurl on the command line with: Create my access token Twurl gem install twurl Have your keys ready from the Twitter application’s tab on the app page. Keys and Access Tokens twurl authorize --consumer-key "Your app’s consumer key" \ --consumer-secret "Your app’s consumer secret" A URL will be returned on the command line. Visit that URL in a web browser and a pin will be presented. Enter that pin on the command line and your app’s tokens will be ready for use with Functions. Go back to the page and find your new access tokens. Keys and Access Tokens After you have configured your Twitter app, you can then configure the PubNub Functions event handler. if you haven’t already! Sign up for PubNub Next we will import the Twitter Function event handler code by clicking on the button . try it now here Import the code to your one of your PubNub apps by following the . Admin Dashboard UI Take the 4 secrets from the Twitter app tab on , and put them into your Functions . This can be accessed from the Functions event handler editor, on the left. Keys and Access Tokens https://apps.twitter.com/ Vault Click and enter your keys and values into the vault following the Twitter event handler code. MY SECRETS Next click the button on the right, (left), and ! Start Module submit a test payload check your Twitter You have enabled automated Tweets! Using the PubNub or any , you can programmatically Tweet! REST API SDK Originally published at . www.pubnub.com our weekly sponsor, empowers you to build immersive, interactive apps. Chat, maps, dashboards, smart device control — PubNub , powered by APIs, delivered through global infrastructure. Learn more about becoming a . Hacker Noon weekly sponsor