remixz/messenger-bot

Add support for uploading files

オープン

#22 opened on 2016/07/01

 (3 件のコメント) (0 件のリアクション) (0 人の担当者)JavaScript (227 件のフォーク)batch import
enhancementhelp wantedstarter

Repository metrics

Stars
 (1,061 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

Facebook just recently added the ability to upload files (images, audio, videos, or a generic file) for a message, instead of having to specify a URL for an attachment.

They all share the same format of it being a multipart POST form, with the file being under the key of filedata. For our sendMessage / reply, we should have some sort of special key in the payload that accepts the same inputs as request does for multipart forms (https://github.com/request/request#forms), and is then added to the request as filedata.

コントリビューターガイド