i created desktop application that upload videos to facebook using graph.facebook and it works ok, but when i try to add "thumb" field to upload request it return error "(OAuthException - #100) (#100) Invalid image format. It should be an image file data." .
here my code used :note coverpath is full image path and i try to path image as bytes but the same error return.
Code
dynamic parameters = new ExpandoObject();
Code
parameters.source = new FacebookMediaObject
Code
{
Code
ContentType = string.Format("video/{0}", VideoExtension.Split('.')[1]),
Code
FileName = VideoName
Code
} .SetValue(File.ReadAllBytes(filePath));
Code
parameters.title = VideoTitle;
Code
parameters.description = VideoTitle;
Code
parameters.universal_video_id = new Guid();
Code
parameters.thumb = coverPath;
Code
parameters.published = false;
Code
parameters.unpublished_content_type = "DRAFT";
Code
dynamic uploadresult = fb.Post("/367728493684998/videos", parameters);