Cant set greeting message or 'Get Started' button for facebook chatbot after once set

此生再无相见时 提交于 2019-12-24 11:45:06

问题


I am trying to edit the Greeting message for my FB Chatbot, the commands are resulting success but the welcome message does not change.

Also, the Get Started button: i could set it successfully for the first time but after once deleting, button is not appearing even though the command results success everytime.

code to set greeting message:

curl -X POST -H "Content-Type: application/json" -d '{
  "setting_type":"greeting",
  "greeting":{
    "text":"Timeless apparel for the masses."
  }
}' "https://graph.facebook.com/v2.6/me/thread_settings?access_token=PAGE_ACCESS_TOKEN"   

for deleting the greeting Message

curl -X DELETE -H "Content-Type: application/json" -d '{
  "setting_type":"greeting"
}' "https://graph.facebook.com/v2.6/me/thread_settings?access_token=PAGE_ACCESS_TOKEN"

for adding GetStarted Button

curl -X POST -H "Content-Type: application/json" -d '{ 
  "get_started":{
    "payload":"GET_STARTED_PAYLOAD"
  }
}' "https://graph.facebook.com/v2.6/me/messenger_profile?access_token=PAGE_ACCESS_TOKEN"  

for deleting GetStarted button:

curl -X DELETE -H "Content-Type: application/json" -d '{
  "fields":[
    "get_started"
  ]
}' "https://graph.facebook.com/v2.6/me/messenger_profile?access_token=PAGE_ACCESS_TOKEN" 

I am using Terminal to run these commands.


回答1:


I could solve it, I had not updated the page access token on the server. So, facebook could return success everytime i updated the greeting message but server was communicating with the old token.

Then why could i still chat with my chatbot when the server has old token. A bit confusing for me.



来源:https://stackoverflow.com/questions/45502066/cant-set-greeting-message-or-get-started-button-for-facebook-chatbot-after-onc

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