Skip to content

Instantly share code, notes, and snippets.

@prabirshrestha
Created June 6, 2011 18:46
Show Gist options
  • Save prabirshrestha/1010812 to your computer and use it in GitHub Desktop.
Save prabirshrestha/1010812 to your computer and use it in GitHub Desktop.
batch request multiple file upload
dynamic result = fb.Batch(
new FacebookBatchParameter(HttpMethod.Post, "/me/photos", new Dictionary<string, object> { { "message", "picture 1 msg" }, { "pic1", new FacebookMediaObject { ContentType = "image/jpeg", FileName = "Tulips.jpg" }.SetValue(File.ReadAllBytes(@"C:\Users\Public\Pictures\Sample Pictures\Tulips.jpg")) } }),
new FacebookBatchParameter(HttpMethod.Post, "/me/photos", new Dictionary<string, object> { { "message", "picture 2 msg" }, { "pic2", new FacebookMediaObject { ContentType = "image/jpeg", FileName = "Penguins.jpg" }.SetValue(File.ReadAllBytes(@"C:\Users\Public\Pictures\Sample Pictures\Penguins.jpg")) } }));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment