node.js - Image and video response from bot to Facebook -


i working on bot , integrated facebook able text response bot. if want image , video response. please help. dig lot got 2 options

curl -x post -h "content-type: application/json" -d '{   "recipient":{     "id":"user_id"   },   "message":{     "attachment":{       "type":"image",       "payload":{         "url":"https://petersapparel.com/img/shirt.png"       }     }   } }' "https://graph.facebook.com/v2.6/me/messages?access_token=page_access_token"       curl -x post -h "content-type: application/json" -d '{   "message":{     "attachment":{       "type":"image",        "payload":{         "url":"http://www.messenger-rocks.com/image.jpg",          "is_reusable":true,       }     }   } }' "https://graph.facebook.com/v2.6/me/message_attachments?access_token=page_access_token"  upload call respond attachment_id can used send attachment user without uploading again.  curl -x post -h "content-type: application/json" -d '{   "recipient": {     "id": "user_id"   },   "message": {     "attachment": {       "type": "image",       "payload": {         "attachment_id": "1745504518999123"       }     }   } }'    

will work me or there other suitable option me?


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -