问题
I am able to upload video from the code below. But the video isn't PRIVATE. I need video to be PRIVATE or in other words it should be SELF.
FacebookMediaObject mediaObject1 = new FacebookMediaObject
{
FileName = pbmFile.fullPath,
ContentType = Path.GetExtension(filePath)
};
byte[] fileBytes1 = System.IO.File.ReadAllBytes(filePath);
mediaObject1.SetValue(fileBytes1);
IDictionary<string, object> upload1 = new Dictionary<string, object>();
upload1.Add("image", mediaObject1);
staticGlobalConst.fbClient1.Post("/me/videos", upload1, staticGlobalConst.del1Video) as JsonObject
When I add the code below it throws exception
I tried adding parameter
upload1.Add("privacy", "SELF");
How can I upload a private video?
Thanks Sujit
回答1:
I solved it by adding below parameter
upload1.Add("privacy", "{\"value\":\"SELF\"}");
回答2:
that is depends on what was your choice for " Visibility of app and posts:
" option when the first time you authenticated with the app.
you can change it to : Public,Friends,Only Me
, from your Account Settings>Apps
and choose your application and change it .
来源:https://stackoverflow.com/questions/15038867/facebook-c-sharp-api-video-getting-uploaded-but-its-public