class_docstr: MesageSender is a wrapper around the facebook messenger requests that simplifies the
  process of sending content.
class_docstr_tok: ["MesageSender","is","a","wrapper","around","the","facebook","messenger","requests","that","simplifies","the","process","of","sending","content","."]
docstr: Sends a message directly to messenger.
docstr_tok: ["Sends","a","message","directly","to","messenger","."]
code: def send_fb_message(
      self,
      receiver_id,
      message,
      is_response,
      quick_replies=None,
      persona_id=None,
  ):
      """
      Sends a message directly to messenger.
      """
      api_address = (
          f"https://graph.facebook.com/{API_VERSION}/me/messages"
      )
      if quick_replies is not None:
          quick_replies = [
              create_reply_option(x, x) for x in quick_replies
          ]
      ms = create_text_message(message, quick_replies)
      results = []
      for m in ms:
          if m["text"] == "":
              continue  # Skip blank messages
          payload = {
              "messaging_type": "RESPONSE" if is_response else "UPDATE",
              "recipient": {"id": receiver_id},
              "message": m,
          }
          if persona_id is not None:
              payload["persona_id"] = persona_id
          response = requests.post(
              api_address, params=self.auth_args, json=payload
          )
          result = response.json()
          if "error" in result:
              if result["error"]["code"] == 1200:
                  # temporary error please retry
                  response = requests.post(
                      api_address, params=self.auth_args, json=payload
                  )
                  result = response.json()
          log_utils.print_and_log(
              logging.INFO,
              '"Facebook response from message send: {}"'.format(
                  result
              ),
          )
          results.append(result)
      return results
  
file_path: ParlAI/parlai/chat_service/services/messenger/message_sender.py
imports: import json
  import logging
  import requests
  import parlai.chat_service.utils.logging
label_desc: Use image node_id 6 for calling the MessageSender obj's underlying member method code with example usage: obj.send_fb_message(receiver_id, message, is_response, quick_replies, persona_id) and returns: results