eristemena / dialogflow-fulfillment-webhook-php

Dialogflow agent fulfillment PHP library supporting v1 & v2
MIT License
103 stars 47 forks source link

Custom Payload to Facebook Messenger // quick reply #34

Open Foddy opened 5 years ago

Foddy commented 5 years ago

Hi,

I am trying to send this custom payload to request the users email. Unfortunately nothing appears on FB Messenger:

$agent->reply(\Dialogflow\RichMessage\Payload::create([
    'quick_replies' => [
        ['content_type' => 'user_email']
    ]
]));

I also tried something like this without success:

$agent->reply(\Dialogflow\RichMessage\Payload::create([
    ['content_type' => 'user_email']
]));

According to the facebook docs this should work: https://developers.facebook.com/docs/messenger-platform/send-messages/quick-replies#email

Has anybody an idea how this should look to work?

basiteaal commented 5 years ago

Do you have an example of the actual response from Dialogflow?

AngelRuiz20XX commented 3 years ago

Just add some "text" and it should work fine :)

{
"facebook": {
"quick_replies": [
{
"content_type":"user_email"
    }
],
"text": "What's your email?"
}
}