我正在尝试找到一种方法来将某人姓名的提交添加到搜索功能中。我需要将名称作为标记发送,但问题出在显示端。
您可以在此处看到该网站 - http://southu.tumblr.com/ 您需要一个密码 - test123
标签显示在视频上方。目前的代码是" 承诺"和" 牺牲"。名称是独立的,因此可以在不同的位置显示。 Tumblr本身并不允许在显示器侧的不同标签之间进行定义。
基本上,我需要支持两个字段作为标记,但不在标记显示中显示名称(在视频上方)
这是VideoSubmissionController.cs文件中的C#。
// Posts the video submission using the TumblrApi.
private void SendToTumblr(VideoSubmission videoSubmission)
{
string consumerKey = ConfigurationManager.AppSettings.Get("TumblrConsumerKey");
string consumerSecret = ConfigurationManager.AppSettings.Get("TumblrConsmerSecret");
string oauthToken = ConfigurationManager.AppSettings.Get("TumblrOauthTokenKey");
string oauthVerifier = ConfigurationManager.AppSettings.Get("TumblrOauthTokenSecret");
Token token = new Token(oauthToken, oauthVerifier);
var client_factory = new TumblrClientFactory();
using (var client = client_factory.Create<TumblrClient>(consumerKey, consumerSecret, token))
{
//string body = "This post was created through the api";
//string title = "Testing API Push";
string[] tags = new string[] { videoSubmission.Question.QuestionText };
//create the data for a text post: use PostData.CreateText
var postData = PostData.CreateVideo(videoSubmission.VideoUrl, videoSubmission.Name, tags);
//create the post: pass the name of the blog where to post to
var postTask = client.CreatePostAsync(ConfigurationManager.AppSettings.Get("TumblrUrl"), postData);
postTask.Wait();
var postResult = postTask.Result;
videoSubmission.TumblrId = postResult.PostId.ToString();
db.Entry(videoSubmission).State = EntityState.Modified;
db.SaveChanges();
}
}