Very easy but I need to remember the following (and I know I won't :)
Getting comments for all posts on the blog, use
http://www.blogger.com/feeds/blogID/comments/defaultThis link does not appear in list of links on AtomEntry.Links
AtomEntry.Links[3] was
http://www.blogger.com/feeds/blogID/posts/default and I simply replaced "posts" with "comments" and then queried the blogger web service.
private void GetComments(AtomEntry blog, string login, string password)
{
Service bloggerService = new Service("blogger", "WebPhotoTool.Accounts");
bloggerService.Credentials = new GDataCredentials(login, password);
FeedQuery query = new FeedQuery();
query.Uri = new Uri(blog.Links[3].AbsoluteUri.ToString().Replace("posts","comments"));
AtomFeed feed = _bloggerService.Query(query);
foreach (AtomEntry entry in feed.Entries)
{
}
}
{
Service bloggerService = new Service("blogger", "WebPhotoTool.Accounts");
bloggerService.Credentials = new GDataCredentials(login, password);
FeedQuery query = new FeedQuery();
query.Uri = new Uri(blog.Links[3].AbsoluteUri.ToString().Replace("posts","comments"));
AtomFeed feed = _bloggerService.Query(query);
foreach (AtomEntry entry in feed.Entries)
{
}
}
No comments:
Post a Comment