【发布时间】:2019-08-01 04:34:16
【问题描述】:
我创建了一个交互式消息按钮来打开一个对话框。
这是交互消息端点的应用程序代码。
$httpClient = new GuzzleHttp\Client();
$httpClient->post($interactionRequest->payload->response_url, [
'json' => [
'text' => 'dialog open',
'trigger_id' => $interactionRequest->payload->trigger_id,
'dialog' => [
'callback_id' => 'ryde-46e2b0',
'title' => 'Request a Ride',
'submit_label' => 'Request',
'elements' => [
[
'type' => 'text',
'label' => 'Pickup Location',
'name' => 'loc_origin',
],
[
'type' => 'text',
'label' => 'Dropoff Location',
'name' => 'loc_destination',
],
],
],
],
]);
请求成功,我在 json text 属性中定义的消息显示在 slack 中。但是对话框没有打开。
我的代码中缺少什么部分来打开一个对话框?
【问题讨论】:
标签: php laravel slack slack-api slack-dialog