We are trying to POST Photo using the below code but getting 200 Ok message but the photo is not visible on the blog, we are tried digging deep but could not find way to work.
Dictionary<string, object> parameters = new Dictionary<string, object>();
parameters.Add("d", DateTime.Now.Ticks.ToString());
var authzHeader = Helper.OAuthHeader(appUrl, "POST", "IdxX6tgxlvsZkwYRwF0nERkMGr1lT7JAUP5imjtjHg5emjyBDR", "IdxX6tgxlvsZkwYRwF0nERkMGr1lT7JAUP5imjtjHg5emjyBDR", parameters);
using (HttpClient client = new HttpClient())
{
var datas = new Dictionary<string, string>()
{
{"type","photo"},
{"caption","test image api"}
};
var data = new FormUrlEncodedContent(datas);
client.BaseAddress = new Uri(appUrl);
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Add("Authorization", authzHeader);
Task.WaitAll(result);
HttpResponseMessage loHttpResponseMessage = result.Result;
}
From this we get the 200 response but the image is not visible on the blog. Can anyone help us.
Thanks and regards.