Facebook Messenger:开始对话时如何显示问候留言 [英] Facebook Messenger :How to show a greeting message when start conversation
问题描述
我想在Facebook Messenger(任何用户输入之前)开始对话时显示问候语。怎么做?
问题是:我的代码是由NodeJS为服务器发送的,只有当消息发送到服务器时才会触发,这意味着只有当用户发送信息时才触发。
Facebook当您按按钮消息时,信使不发送任何内容。
我已经检查这个链接Messenger问候语,但它只显示一个新的用户开始聊天,但是我需要在开始对话时显示
I want to show a greeting message when start a conversation on Facebook Messenger ( before any user input ) . How to do it?
The problem is : My code is for server by NodeJS ,and it only trigger when a message is send to server ,which mean it only be triggered when users send something.
Facebook messenger doesn't send anything when you press button "Message".
I have check this link Messenger Greeting , but it only shows when a new user starts chat ,but i need show it when starting conversations
推荐答案
您必须使用Facebook Api设置欢迎消息。
在这里找到文档: https://developers.facebook.com/ docs / messenger-platform / implementation#welcome_screen
You have to set a welcome message, using the Facebook Api. Find the documentation here: https://developers.facebook.com/docs/messenger-platform/implementation#welcome_screen
如文档中所述,您必须向 https发送POST请求: //graph.facebook.com/v2.6/<PAGE_ID>/thread_settings?access_token=<PAGE_ACCESS_TOKEN>
As explained in the documentation, you have to make a POST request to https://graph.facebook.com/v2.6/<PAGE_ID>/thread_settings?access_token=<PAGE_ACCESS_TOKEN>
您需要使POST请求只有一次,然后Facebook将在用户开始聊天时自动提示您的欢迎信息。
You need to make the POST request only once, then Facebook will automatically prompt your welcome message whenever a user starts a chat.
这篇关于Facebook Messenger:开始对话时如何显示问候留言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!