I am sending post request to facebook graph api using Httparty gem.
My code is
message_data ={
"recipient" => {
"id" => recipient_id
},
"message" => {
"attachment" => {
"type" => "template",
"payload" => {
"template_type" => "generic",
"elements" => [
{
"title" => "Titilize",
"subtitle" => "Subtitle"
}
]
}
}
}
}
options ={
"query": {access_token: @page_access_token},
"body": message_data
}
HTTParty.post("https://graph.facebook.com/v2.6/me/messages",options)
Httparty will send data by converting hash into json.
Problem is at the end point data is receiving differently not as i expected (maybe httparty is not parsing properly).
Someone help me with this.
Thanks