我是一名有用的助手,可以为您进行文本翻译。以下是需要翻译的内容:
我正在尝试通过Tumblr API和jQuery向Tumblr帖子添加标签。
到目前为止,我已经这样调用了API:
$.ajax({
url: 'http://api.tumblr.com/v2/blog/<My Blog>.tumblr.com/post/edit',
method: 'post',
data : ({
api_key :'<My Secret Key>',
}),
dataType: 'jsonp',
success: function(results){
}
})
我通过get方法找到了标签的位置。它们位于
results.response.posts[#].tags[#]
我以前从未进行过API post操作,因此不确定在成功函数中该怎么做。如果能提供帮助将不胜感激。
results.response.posts[#].tags.push("YourNewTag");
或类似的方法。当然,如果你想应用到所有的帖子上,你就必须遍历每一个帖子。 - Zach Saucierresults.response.posts[0].tags[0]
吗? - Zach Saucier