Skip to content

Commit

Permalink
Merge pull request #120 from alvin-reyes/master
Browse files Browse the repository at this point in the history
Added Quick Reply Image
  • Loading branch information
Alvin Reyes authored May 21, 2017
2 parents a422b8e + f8a7e31 commit cf96329
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,29 @@ public TextMessageBuilder addQuickReply(String title, String payload) {
this.quickReplies.add(new QuickReply(title, payload));
return this;
}

/**
* Adds a {@link QuickReply} to the current object.
*
* @param title
* the quick reply button label. It can't be empty.
* @param payload
* the payload sent back when the button is pressed. It can't be
* empty.
* @param imageUrl
* the image to show on the quick reply.
* @return this builder.
* @see <a href=
* "https://developers.facebook.com/docs/messenger-platform/send-api-reference/quick-replies"
* > Facebook's Messenger Platform Quick Replies Documentation</a>
*/
public TextMessageBuilder addQuickReply(String title, String payload, String imageUrl) {
if (this.quickReplies == null) {
this.quickReplies = new ArrayList<QuickReply>();
}
this.quickReplies.add(new QuickReply(title, payload, imageUrl));
return this;
}

/**
* Adds a {@link QuickReply} to the current object.
Expand Down

0 comments on commit cf96329

Please sign in to comment.