Created
July 31, 2018 15:27
-
-
Save easterapps/add8cb2b66ccd152c8391f95ac96a3d9 to your computer and use it in GitHub Desktop.
sample dialogflow v2 php webhook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include('Webhook.php'); | |
$webhook = new Webhook('<your Google project id>'); | |
$webhook->build_simpleResponse('Voice Text', "Display Text?"); | |
$webhook->build_suggestions('Suggestion 1'); | |
$webhook->build_suggestions('Suggestion 2'); | |
$webhook->respond(); |
Would you be able to provide a sample for two carrousel items? I'm not able to get it right.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems that "displayText" => $stringToDisplay, is no more supported. I had to edit it in : "fulfillmentText" => $textToSpeak,