-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possibility of attaching files instead of using URLS #2
Comments
I'm having some troubles on this. I've tried this:
But I'm getting an error about the attached file not supported. If I do the same request from postman it works though. I think the problem is related to the headers. This is the request generated by postman:
As you can see the Content-Type of the file data (the last part) is empty here, meanwhile the one generated with Apache Http is application/octet-stream and I don't really know how to leave it empty. Any help is appreciated. |
It seems that the UploadAPI should resolve this issue. Please close if so. |
I think they are 2 different features but I have to look more into it. Meanwhile, I've opened this question on StackOverflow. |
Currently the reply factory object will allow only to attach files using URLS (audio, video, images and generic files attachments). Facebook API's also allows to upload a file directly. It would be nice to add this feature to the framework. Here's an instance of how to do it with cURL: https://developers.facebook.com/docs/messenger-platform/send-api-reference/audio-attachment.
In order to do this with FaceBot, we should add a method that makes a POST with multipart/data.
I've made some tests with Postman and the API works even if you don't specify the extension of file you are attaching, so we don't need to add that.
The text was updated successfully, but these errors were encountered: