Closed allandereal closed 6 years ago
Hey @allandereal,
cannot test it right now but from what I remember you cannot add text to fb attachment. you need to write a message before or after. This is little bit misleading because of the OutgoingMessage
object where you can set the text. (which works on other drivers)
You could also use the Facebook MediaTemplate from BotMan to send image / video with buttons connected. Hope that helps.
I just checked it again. FB does not allow a message next to the attachment. This is different from driver to driver. You should write a second message for your text.
What is the proper way to send attachment via "driver-facebook"?
Here it is:
$message = \BotMan\BotMan\Messages\Outgoing\OutgoingMessage::create('')->withAttachment($attachment);
$botman->say($message, $channel_id, $driver_class);
Consider the code below. The message "This is a video is not sent out, though the video is".
$attachment = new Video('video_url'); $message = OutgoingMessage::create('This is a Video')->withAttachment($attachment); $this->say($message);