Facebook Messenger :How to show a greeting message when start conversation

£可爱£侵袭症+ 提交于 2019-12-25 08:15:19

问题


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


回答1:


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

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>

You need to make the POST request only once, then Facebook will automatically prompt your welcome message whenever a user starts a chat.




回答2:


I wrote and answer for this question here.

Have a nice working ;)



来源:https://stackoverflow.com/questions/37874184/facebook-messenger-how-to-show-a-greeting-message-when-start-conversation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!