本文整理汇总了Java中com.restfb.types.send.Message.addQuickReplies方法的典型用法代码示例。如果您正苦于以下问题:Java Message.addQuickReplies方法的具体用法?Java Message.addQuickReplies怎么用?Java Message.addQuickReplies使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.restfb.types.send.Message
的用法示例。
在下文中一共展示了Message.addQuickReplies方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testQuickRepliesWithTextMessage
import com.restfb.types.send.Message; //导入方法依赖的package包/类
@Test
public void testQuickRepliesWithTextMessage() {
String text = "Hello!";
List<QuickReply> quickReplies = createQuickReplies();
sendOperations.quickReplies(RESPONSE, messageRecipient, text, quickReplies);
Message message = new Message(text);
message.addQuickReplies(quickReplies);
verifySend(RESPONSE, messageRecipient, Parameter.with(MESSAGE_PARAM_NAME, message));
}
示例2: testQuickRepliesWithTextMessageAndNotificationType
import com.restfb.types.send.Message; //导入方法依赖的package包/类
@Test
public void testQuickRepliesWithTextMessageAndNotificationType() {
String text = "Hello!";
List<QuickReply> quickReplies = createQuickReplies();
sendOperations.quickReplies(RESPONSE, messageRecipient, text, quickReplies, NotificationTypeEnum.NO_PUSH);
Message message = new Message(text);
message.addQuickReplies(quickReplies);
verifySend(RESPONSE, messageRecipient,
Parameter.with(NOTIFICATION_TYPE_PARAM_NAME, NotificationTypeEnum.NO_PUSH),
Parameter.with(MESSAGE_PARAM_NAME, message));
}
示例3: testQuickRepliesWithTextMessageAndNotificationTypeAndMessageTag
import com.restfb.types.send.Message; //导入方法依赖的package包/类
@Test
public void testQuickRepliesWithTextMessageAndNotificationTypeAndMessageTag() {
String text = "Hello!";
List<QuickReply> quickReplies = createQuickReplies();
sendOperations
.quickReplies(RESPONSE, messageRecipient, text, quickReplies, NotificationTypeEnum.NO_PUSH, MessageTag.ISSUE_RESOLUTION);
Message message = new Message(text);
message.addQuickReplies(quickReplies);
verifySend(RESPONSE, messageRecipient,
Parameter.with(NOTIFICATION_TYPE_PARAM_NAME, NotificationTypeEnum.NO_PUSH),
Parameter.with(TAG_PARAM_NAME, MessageTag.ISSUE_RESOLUTION.getTag()),
Parameter.with(MESSAGE_PARAM_NAME, message));
}
示例4: testQuickRepliesWithTextMessageAndMessageTag
import com.restfb.types.send.Message; //导入方法依赖的package包/类
@Test
public void testQuickRepliesWithTextMessageAndMessageTag() {
String text = "Hello!";
List<QuickReply> quickReplies = createQuickReplies();
sendOperations.quickReplies(RESPONSE, messageRecipient, text, quickReplies, MessageTag.ISSUE_RESOLUTION);
Message message = new Message(text);
message.addQuickReplies(quickReplies);
verifySend(RESPONSE, messageRecipient,
Parameter.with(TAG_PARAM_NAME, MessageTag.ISSUE_RESOLUTION.getTag()),
Parameter.with(MESSAGE_PARAM_NAME, message));
}
示例5: testQuickRepliesWithTextMessageAndCustomMessageTag
import com.restfb.types.send.Message; //导入方法依赖的package包/类
@Test
public void testQuickRepliesWithTextMessageAndCustomMessageTag() {
String text = "Hello!";
List<QuickReply> quickReplies = createQuickReplies();
sendOperations.quickReplies(RESPONSE, messageRecipient, text, quickReplies, new MessageTag("CUSTOM"));
Message message = new Message(text);
message.addQuickReplies(quickReplies);
verifySend(RESPONSE, messageRecipient,
Parameter.with(TAG_PARAM_NAME, "CUSTOM"),
Parameter.with(MESSAGE_PARAM_NAME, message));
}
示例6: testQuickRepliesWithMediaAttachment
import com.restfb.types.send.Message; //导入方法依赖的package包/类
@Test
public void testQuickRepliesWithMediaAttachment() {
MediaAttachment attachment = createMediaAttachment();
List<QuickReply> quickReplies = createQuickReplies();
sendOperations.quickReplies(RESPONSE, messageRecipient, attachment, quickReplies);
Message message = new Message(attachment);
message.addQuickReplies(quickReplies);
verifySend(RESPONSE, messageRecipient, Parameter.with(MESSAGE_PARAM_NAME, message));
}
示例7: testQuickRepliesWithMediaAttachmentAndNotificationType
import com.restfb.types.send.Message; //导入方法依赖的package包/类
@Test
public void testQuickRepliesWithMediaAttachmentAndNotificationType() {
MediaAttachment attachment = createMediaAttachment();
List<QuickReply> quickReplies = createQuickReplies();
sendOperations.quickReplies(RESPONSE, messageRecipient, attachment, quickReplies, NotificationTypeEnum.NO_PUSH);
Message message = new Message(attachment);
message.addQuickReplies(quickReplies);
verifySend(RESPONSE, messageRecipient,
Parameter.with(NOTIFICATION_TYPE_PARAM_NAME, NotificationTypeEnum.NO_PUSH),
Parameter.with(MESSAGE_PARAM_NAME, message));
}
示例8: testQuickRepliesWithTemplateAttachment
import com.restfb.types.send.Message; //导入方法依赖的package包/类
@Test
public void testQuickRepliesWithTemplateAttachment() {
ButtonTemplatePayload payload = new ButtonTemplatePayload("body text");
TemplateAttachment attachment = new TemplateAttachment(payload);
List<QuickReply> quickReplies = createQuickReplies();
sendOperations.quickReplies(RESPONSE, messageRecipient, attachment, quickReplies);
Message message = new Message(attachment);
message.addQuickReplies(quickReplies);
verifySend(RESPONSE, messageRecipient, Parameter.with(MESSAGE_PARAM_NAME, message));
}
示例9: testQuickRepliesWithTemplateAttachmentAndNotificationType
import com.restfb.types.send.Message; //导入方法依赖的package包/类
@Test
public void testQuickRepliesWithTemplateAttachmentAndNotificationType() {
ButtonTemplatePayload payload = new ButtonTemplatePayload("body text");
TemplateAttachment attachment = new TemplateAttachment(payload);
List<QuickReply> quickReplies = createQuickReplies();
sendOperations.quickReplies(RESPONSE, messageRecipient, attachment, quickReplies, NotificationTypeEnum.NO_PUSH);
Message message = new Message(attachment);
message.addQuickReplies(quickReplies);
verifySend(RESPONSE, messageRecipient,
Parameter.with(NOTIFICATION_TYPE_PARAM_NAME, NotificationTypeEnum.NO_PUSH),
Parameter.with(MESSAGE_PARAM_NAME, message));
}