Reputation: 11
async locationStep(step) {
await step.context.sendActivity('Please give me your location')
const reply = MessageFactory.suggestedActions(['Send location'])
reply.suggestedActions.actions[0].content_type = 'location'
reply.suggestedActions.actions[0].type = 'location'
return step.prompt(LOCATION_PROMPT, reply)
}
I want to add quick replies FB Messenger when prompt location in botbuilder v4 like this one (https://developers.facebook.com/docs/messenger-platform/send-messages/quick-replies/#best_practices) but it not works. Is there a solution to this? Thank you for helping me!
Upvotes: 1
Views: 392
Reputation: 3712
In v4 of the Microsoft Botframework, Facebook location quick replies can be sent using the channelData
attribute in the activity. See the example below.
await turnContext.sendActivity({
text: 'Would you mind sharing your location?',
channelData: {
"quick_replies":[
{
"content_type": "location"
}
]
}
});
Hope this helps!
Upvotes: 1