ExFacebookMessenger v0.4.0 FacebookMessenger.Sender

Module responsible for communicating back to facebook messenger

Summary

Functions

creates a payload for an image message to send to facebook

sends a message to the the recepient

sends an image message to the recipient

creates a payload to send to facebook

converts a map to json using poison

return the url to hit to send the message

Functions

image_payload(recepient, image_url)

creates a payload for an image message to send to facebook

  • :recepient - the recepient to send the message to
  • :image_url - the url of the image to be sent
send(recepient, message)

Specs

send(String.t, String.t) :: HTTPotion.Response.t

sends a message to the the recepient

  • :recepient - the recepient to send the message to
  • :message - the message to send
send_image(recepient, image_url)

Specs

send_image(String.t, String.t) :: HTTPotion.Response.t

sends an image message to the recipient

  • :recepient - the recepient to send the message to
  • :image_url - the url of the image to be sent
text_payload(recepient, message)

creates a payload to send to facebook

  • :recepient - the recepient to send the message to
  • :message - the message to send
to_json(map)

converts a map to json using poison

  • :map - the map to be converted to json
url()

return the url to hit to send the message