-->

Cant set greeting message or 'Get Started'

2019-08-14 08:31发布

问题:

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.