0
随着REST api在被弃用的过程中,我试图将我们现有的应用程序转换为使用facebook c#sdk。Facebook图形API - 视频上传
我们目前可以做的一件事是上传视频。
我已经创建了一个POST请求,如下所示,但是我得到'Unsupported Post Request'失败。
byte[] video = File.ReadAllBytes(TESTDATA_DIR + "Snowboarding penguin.mov");
if (_FBClient != null)
{
var parameters = new Dictionary<string, object>();
parameters.Add("message", "This is a Graph API unit test message containing a video! (" + DateTime.Now.ToString() + ")");
parameters["caption"] = "This is the caption for the unit test message!";
parameters["description"] = "This is description for the unit test message!";
parameters["name"] = "This is name of the unit test message!";
parameters["req_perms"] = "publish_stream";
parameters["scope"] = "publish_stream";
var mediaObject = new FacebookMediaObject
{
FileName = "Snowboarding penguin.mov",
ContentType = "video/mov",
};
mediaObject.SetValue(video);
parameters.Add("source", mediaObject);
_FBClient.Post("me/videos", parameters);
}
我看到许多关于视频上传一般职位不是由图形API的支持,但希望这已经被FB现在已经得到解决。
任何人都可以引导我以正确的方向获取此请求的工作?
TIA
抱歉,未收到您的回复通知。我试过这个,但是我收到了'无效oAuth 2.0令牌'的回应 - 但是我可以发布没有问题的照片或状态消息? – VorTechS 2011-02-23 13:06:19