gpt4 book ai didi

.net - 无法获取博主评论 API v3

转载 作者:行者123 更新时间:2023-12-05 07:52:19 24 4
gpt4 key购买 nike

我正在尝试获取博主的帖子评论,但即使帖子中有评论,结果也为空。

https://www.googleapis.com/blogger/v3/blogs/2399953/posts/7706273476706534553/comments?key=API-KEY

代码

Google.Apis.Services.BaseClientService.Initializer service = new Google.Apis.Services.BaseClientService.Initializer();
service.ApiKey = "API-KEY";

BloggerService blogger = new BloggerService(service);

var blogQuery = blogger.Blogs.GetByUrl("http://buzz.blogger.com/");
var blog = blogQuery.Execute();

PostsResource.ListRequest query = blogger.Posts.List(blog.Id);
query.MaxResults = 500;

PostList result = query.Execute();

foreach (Post post in result.Items)
{
CommentsResource.ListRequest commentsQuery = blogger.Comments.List(blog.Id, post.Id);
commentsQuery.MaxResults = 500;
CommentList comments = commentsQuery.Execute();
post.Replies.Items = comments.Items;
}

最佳答案

在我的例子中,这是一个博客设置,它阻止了评论的加载。在设置中转到网站提要并激活完整版本。 Eureka enter image description here

关于.net - 无法获取博主评论 API v3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33873190/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com