【问题标题】:Facebook Message APIFacebook 消息 API
【发布时间】:2019-11-07 09:51:18
【问题描述】:

我正在创建 Facebook 消息。目前,我正在使用以下消息数据发送带有标题、副标题、图像和按钮的消息。

var messageData = {
                    recipient: {
                        user_ref: recipientId
                    },
                    message: {
                        attachment: {
                            type: 'template',
                            payload: {
                                template_type: 'generic',
                                sharable: true,
                                image_aspect_ratio: 'square',
                                elements: [ {
                                        title: new_title,
                                        subtitle: messageText,
                                        image_url: new_image_url,
                                        default_action: {
                                            type: 'web_url',
                                            url: new_link,
                                            webview_height_ratio: 'tall'
                                        }
                                    }
                                ]
                            }
                        },
                        metadata: "DEVELOPER_DEFINED_METADATA"
                    }
                };

我希望能够在同一 Facebook 消息中添加视频。可能吗? 到目前为止,我已经看到您可以在单独的消息中发送视频,但不能使用带有标题、图像、副标题等的模板 (https://developers.facebook.com/docs/messenger-platform/send-messages#sending_attachments)

【问题讨论】:

    标签: facebook facebook-messenger


    【解决方案1】:

    通用模板不支持视频。您可以使用附件 API 或媒体模板(首选)发送视频。 但是,不提供带有显示实际视频选项的通用模板。

    【讨论】:

    • 是的,我已经看到我可以使用媒体模板了。我可以发送视频,但我看不到如何添加标题和副标题
    • 听起来您正在寻找通用模板样式,但可以选择显示实际视频。这根本不可用。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-10-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-28
    • 1970-01-01
    相关资源
    最近更新 更多