olsh/curl-to-csharp

incorect translation of params

cosmaioan opened this issue · 3 comments

curl
-F 'message={"attachment":{"type":"image", "payload":{"is_reusable":true}}}'
-F 'filedata=@/tmp/shirt.png;type=image/png'
"https://graph.facebook.com/v2.6/me/message_attachments?access_token=<PAGE_ACCESS_TOKEN>"

I must say that at the moment I don't know what is the problem. But the curl work and the c# does not. (=>bad request)

I must say that project is very usefull (hope it works in my case) for example FB has examples only with curl.
https://developers.facebook.com/docs/messenger-platform/reference/attachment-upload-api/

olsh commented

Hi @cosmaioan,

Thanks for the reporting.
It seems like there is an issue with mime type parsing. I'll take a look.

olsh commented

@cosmaioan
I've just fixed the issue with mime type parsing. Sadly, I don't have a facebook account, so I can't test it.
Could you please check if your curl can be correctly translated to C#?

olsh commented

Closed due to inactivity, feel free to reopen it