Twilio - twilio/sdk 消息的 PHP 状态回调 [英] Twilio - twilio/sdk PHP Status Callback for messages
问题描述
我正在尝试使用 twilio/sdk
在外发 SMS 消息上设置 StatusCallback - 请参阅 https://github.com/twilio/twilio-php
I am attempting to set a StatusCallback on outgoing SMS messages using twilio/sdk
- see https://github.com/twilio/twilio-php
我遇到的问题是 StatusCallback 选项似乎应该包含在 Body 之后的数组中,如下所示:
The problem I'm running into is that it would appear that the StatusCallback option should be included in an array after the Body, like so:
$this->twilio->account->messages->sendMessage(
"+{$this->client->number}",
"+{$phone->number}",
$outgoing,
array('StatusCallback' => 'http://foo.bar/status')
);
.. 但 Twilio 现在支持 MMS 消息,并且似乎将其视为对媒体的参考.我错过了什么?如何通过此帮助程序库使用状态回调?
.. but Twilio now supports MMS messaging and seems to be considering this a reference to media. What am I missing? How can I use the Status Callback with this helper library?
谢谢!
推荐答案
Twilio 布道者在这里.
Twilio evangelist here.
查看这篇帖子并回答似乎适合您的问题:
Check out this post and answer which seem to fit your question:
特别注意,在第四个参数中构建数组时,您实际上可以指定键/值对,其中键是您尝试向 Twilio 发送的参数.
Specifically notice that when building the array in the fourth parameter you can actually specify key/value pairs, where the key is the parameter you're trying to send Twilio.
希望有所帮助.
这篇关于Twilio - twilio/sdk 消息的 PHP 状态回调的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!