Fritak / messenger-platform

Implementation of the Messenger Platform in a PHP.
MIT License
34 stars 15 forks source link

Send image from file #17

Open achimha opened 8 years ago

achimha commented 8 years ago

Currently it appears the API wrapper only supports sending image as URLs but not as files. The Facebook API supports this and it should be done using CURLFile in PHP.

Any plans to add this?

curl \ -F recipient='{"id":"USER_ID"}' \ -F message='{"attachment":{"type":"image", "payload":{}}}' \ -F filedata=@/tmp/testpng.png \ "https://graph.facebook.com/v2.6/me/messages?access_token=PAGE_ACCESS_TOKEN"

Fritak commented 8 years ago

Yes, I'm working on it.