app.js
/*
 * Send a button message using the Send API.
 *
 */
Send a button message using the Send API.
Send a button message using the Send API .
function sendButtonMessage(recipientId, text, buttons) {
	var messageData = {
		recipient: {
			id: recipientId
		},
		message: {
			attachment: {
				type: "template",
				payload: {
					template_type: "button",
					text: text,
					buttons: buttons
				}
			}
		}
	};
	callSendAPI(messageData);
}
function sendButtonMessage ( recipientId , text , buttons ) { var messageData = { recipient : { id : recipientId } , message : { attachment : { type : "template" , payload : { template_type : "button" , text : text , buttons : buttons } } } } ; callSendAPI ( messageData ) ; }
Send a button message using the Send API.
Send a button message using the Send API .