Created
June 4, 2017 21:03
-
-
Save elmontoya7/eb0b7a1dd5d98e068e6d743227db6446 to your computer and use it in GitHub Desktop.
A6BRTGFDSFM FUNCTIONS USAGE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by montoya on 6/4/17. | |
*/ | |
var a6Bot = new A6BotResponseTemplate(process.env.FACEBOOK_PAGE_ID); | |
var recipientID = 1234567890; | |
//SEND MESSAGE | |
a6Bot.message('Hello world!', recipientID); | |
//SEND MULTIPLE MESSAGES | |
a6Bot.message('Hello world!'); | |
a6Bot.message('Welcome to my bot :)'); | |
a6Bot.send(recipientID); | |
//SEND MESSAGE WITH BUTTONS | |
a6Bot.template.title('Select an option or visit our web').btn('Option One', 'payload').btn('Option Two', 'payload').url('Got to website', 'url').send(recipientID); | |
//QUEUE MESSAGE WITH BUTTONS | |
a6Bot.message('Welcome user!'); | |
a6Bot.template.title('Start or visit web site?').btn('Start', 'payload').url('Web', 'payload').send(); | |
a6Bot.send(recipientID); | |
//SEND MESSAGE WITH QUICK REPLIES | |
a6Bot.quickreply.title('Should we continue?').quick('Yes', 'payload').send(recipientID); | |
//QUEUE MESSAGE WITH QUICK REPLIES | |
a6Bot.message('Share your location with me'); | |
a6Bot.quickreply.title('Select an option:').quick('Skip', 'payload').location().send(); | |
a6Bot.send(recipientID); | |
//SEND IMAGE | |
a6Bot.image('url', recipientID); | |
//SEND TYPING ON | |
a6Bot.message('Look at this bug while I search your stuff...'); | |
a6Bot.image('https://www.bugs.com/images/pest-library/other-bugs.png'); | |
a6Bot.typing(); | |
a6Bot.send(recipientID); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment