Facebook C#API,视频已上传,但其发布 [英] facebook c# api, video getting uploaded but its PUBLIC

查看:44
本文介绍了Facebook C#API,视频已上传,但其发布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以从下面的代码上传视频.但是视频不是私人的.我需要将视频设为私人",换句话说,它应该是自拍".

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

我尝试添加参数

upload1.Add("privacy", "SELF");

如何上传私人视频?

谢谢 苏吉特

推荐答案

我通过添加以下参数解决了该问题

I solved it by adding below parameter

upload1.Add("privacy", "{\"value\":\"SELF\"}");

这篇关于Facebook C#API,视频已上传,但其发布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆