fbotw.post_text_message

fbbotw.post_text_message(fbid, message, messaging_type=’RESPONSE’, tag=None)[source]

Sends a common text message to the specified user.

Usage:
>>> # Set the user fbid and the message you want to send.
>>> fbid = "<user page scoped id>"
>>> text = "Hi. How are you doing today?"
>>> # Send the message to the user
>>> response = fbbotw.post_text_message(
        fbid=fbid,
        message=text
    )
Parameters:
  • fbid (str) – User id to send the text.
  • message (str) – Text to be displayed for the user (640 chars limit).
  • messaging_type (str) – Identifies the message type from: RESPONSE, UPDATE AND MESSAGE_TAG (Default: RESPONSE, if MESSAGE_TAG, tag param is required)
  • tag (str) – Tag classifying the message, must be one of the following tags
Returns:

Response object

Facebook docs:

/text-message