This guide explains how to display your actions in a conversation to let message recipients know that you have seen and are processing their message.
To display the action for a sender in the conversation, send a POST
request to the /PAGE-ID/messages
endpoint with the sender_action
parameter set to typing_on
.
curl -X POST -H "Content-Type: application/json" -d '{
"recipient":{
"id":"<PSID>"
},
"sender_action":"typing_on"
}' "https://graph.facebook.com/VERSION/PAGE-ID/messages?access_token=PAGE-ACCESS_TOKEN;"
sender_action
parameter and the recipient
object. All other Send API properties, such as text and templates, should be sent in a separate request.Visit the Page Messages reference for a complete list of sender actions.
Send the mark_seen
indicator when your bot receives a message so that the user does not feel ignored.
Send the typing_on
indicator when your bot receives a message it will respond to. This helps create a conversational experience.
Send typing_on
and typing_off
actions in the separate batch requests. Batched requests are executed in order very quickly. This quick execution may result in the typing_on
indicator being displayed for a fraction of a second if both actions are sent in the same batch.
Do not allow an unnatural amount of time (too long or too short) to pass between typing_on
and typing_off
sender actions. Ideally, the user should feel that a real person was typing the message in the elapsed time.
For a complete list of API calls and request properties, see the Send API Reference.