use of co.aurasphere.botmill.fb.model.incoming.callback.Postback in project fb-botmill by BotMill.
the class FbBotMillMockMediator method sendPayload.
/**
* Sends a payload to all the registered bots. Used to simulate a user
* interacting with buttons.
*
* @param payload
* the payload to send.
*/
public void sendPayload(String payload) {
MessageEnvelope envelope = new MessageEnvelope();
Postback postback = new Postback();
postback.setPayload(payload);
envelope.setPostback(postback);
envelope.setSender(new User(facebookMockId));
System.out.println("Sending payload: [" + payload + "] as user : [" + facebookMockId + "].");
forward(envelope);
System.out.println("Sent!");
}
Aggregations