When Sending Message showing recipient is required

HomeCategory: DevelopmentWhen Sending Message showing recipient is required
Mukesh Sharma Member asked 5 months ago

I am trying to send notification with facebook message api i stored all objects to one file and then iterating it to send notification. I am getting Error
{“body”:{“error”:{“message”:”(#100) The parameter recipient is required”,”type”:”OAuthException”,”code”:100,”fbtrace_id”:”AxeyCwmzgfL”}},”level”:”error”,”message”:”ResponseCode:400 and Error:{\”err\”:null} and body:%b”,”timestamp”:”2017-06-15T14:34:29.170Z”}
But when i am doing manual curl hit with same one object it is going success.
My object : {“recipient”:{“id”:”1279174855465851″},”message”:{“attachment”:{“type”:”template”,”payload”:{“template_type”:”generic”,”elements”:[{“title”:”One Ingredient your Child’s Biscuit should Never Contain”,”subtitle”:”In today’s times as parents we are very health-conscious and take great care in selecting food items for our children We make all efforts to ensure that our kids are eating a healthy and balanced diet We do whatever it “,”image_url”:”https://www.babydestination.com/wp-content/uploads/2017/05/slurrp-farm-cookie.jpg”,”buttons”:[{“type”:”web_url”,”url”:”https://www.babydestination.com/blog/one-ingredient-your-childs-biscuit-should-never-contain?utm_source=Fbbotnoti&utm_medium=referral”,”title”:”Read More”,”webview_height_ratio”:”full”},{“type”:”element_share”},{“type”:”postback”,”title”:”Explore Topics”,”payload”:”LOOKING_FOR_TIPS”}]}]}}}}

Mukesh Sharma Member replied 5 months ago

I forgot to decode Json