Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm tying to upload photo to Tumblr via RestSharp. Here are my code.

C#
var restClient = new RestClient("http://tumblr.com/api/write");
  var request = new RestRequest(Method.POST);


  request.RequestFormat = DataFormat.Json;

  request.AddParameter("email", "123@456.com");
  request.AddParameter("password", "acb");
  request.AddParameter("type", "photo");
  request.AddParameter("caption", "testing");
  request.AddFile("data", "C:\\photo\\photo1.jpg");

  IRestResponse response = restClient.Execute(request);


Nothing happen after the code been executed. Is there anything wrong with my code? Thanks in advance.

p.s : Is oauth needed?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900