1

在 C# 中,我使用以下方法将视频文件从服务器上传到 Facebook:

        string fullurl = "https://graph-video.facebook.com/me/videos?" + "title=" + title + "&access_token=" + accessToken;
        WebClient client = new WebClient();
        byte[] returnBytes = client.UploadFile(fullurl, path);

path 是服务器上视频文件的路径。这有效,并在用户个人资料上显示上传的视频帖子。如何向该帖子添加文本描述(带链接)和操作链接?

请保留 C# 中的答案

4

2 回答 2

2

您应该通过嵌入的 URL传递额外的查询字符串参数 -描述。像这样的东西:

var description = "Bring your conversations to life on Facebook. With face-to-face video calling, now you can watch your friends smile, wink and LOL.\n\nTo get started, visit http://www.facebook.com/videocalling"; 

string fullurl = string.Format("https://graph-video.facebook.com/me/videos?title={0}&description={1}&access_token={2}", HttpUtility.UrlEncode(title), HttpUtility.UrlEncode(description ), accessToken);
于 2012-05-08T21:11:32.180 回答
0

我做的。以下是我的代码:

string a = "User_Access_Token";
string fullurl = string.Format("https://graph-video.facebook.com/me/videos?title={0}&description={1}&access_token={2}", HttpUtility.UrlEncode("Dulha"), HttpUtility.UrlEncode("hello"), a);
WebClient client = new WebClient();
byte[] returnBytes = client.UploadFile(fullurl, @"C:\Users\Users\Downloads\Dulha.mp4");
于 2017-01-05T07:31:18.987 回答