我正在尝试使用Blogger API v3.0插入新博客文章,以下是我的示例有效负载
var payload = {
"title" : "This is the post title2",
"content" : "This is <b>HTML</b> post2"
};
Run Code Online (Sandbox Code Playgroud)
这可以按预期工作,但是我在发布这些新帖子时需要插入标签,我查看了文档和Google,但没有帮助。我尝试了如下
var payload = {
"title" : "This is the post title2",
"content" : "This is <b>HTML</b> post2",
"labels" : "test_post,test,post"
};
Run Code Online (Sandbox Code Playgroud)
基于v1.0 php示例,仍然无法成功。
“ 发布资源”文档指出该labels属性是一个列表。您的有效负载应该看起来像这样:
var payload = {
"title" : "This is the post title2",
"content" : "This is <b>HTML</b> post2",
"labels" : [
"test_post",
"test",
"post"
]
};
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
547 次 |
| 最近记录: |