Problem with Updtae_with_media


#1

Hello!
I have the same problem.
My code is this:
New RestRequest request = (“statuses / update_with_media.json” Method.POST)
request.AddHeader (“Content-Type”, “multipart / form-data”)

Dim media As New Dictionary (Of String, Stream)
media.Add (filename, stream)

request.AddBody (“media[]” media.ToString ())
request.AddBody (“Attachment-Format”, “MIME”)
request.AddBody (“Content-Disposition”, “form-data”)

request.AddParameter (“status”, “@” & screenName & “” & stMsj)
request.AddParameter (“in_reply_to_status_id”, 22222)

Dim response As client.Execute RestResponse = (request)

and returns me {“errors”: [{“code”: 195, “message”: “Missing or invalid url parameter.”}]}

I tried to send media [] in parameter. I get the same result.

I tried to send
request.AddParameter (“media[]” stream.ToString () & “; type = image / jpeg; filename =” & filename)
parameter instead of what I sent as body. The result is always the same

Any idea? Thank you


#2

What language is this and which library are you using to connect to Twitter?


#3

And I do use Vb.net restsharp live on. Do not use any library.