Blogging and News Syndication Software

Blogger API, RSS API, Atom API, and more.
posts - 17, comments - 13, trackbacks - 26

My Links

News

Tortuga Components / Software Tools Home

See Also: Chilkat Software

Article Categories

Archives

Post Categories

Recommended

Blogger 1.0 API Visual Basic Example: Delete Post

Example VB program to delete a post:
  
  ' Delete a post.
    Dim b1 As New Blogger1
    b1.Login = "MyLogin"
    b1.Password = "MyPassword"
    b1.ServiceUrl = "http://www.livejournal.com/interface/blogger"
    
    ' Get the blog ID of the 1st blog for this account.
    Dim blogId As String
    success = b1.GetUsersBlogs()
    If (success = 1 And (b1.NumBlogs > 0)) Then
        blogId = b1.GetBlogId(0)
    Else
        MsgBox "Failed to get users blogs!"
    End If
    
    ' Get the recent posts for blogId (max of 10)
    postCount = b1.GetRecentPosts(blogId, 10)
    
    If (postCount > 0) Then
        ' Delete the most recent post, which is always at index 0.
        Dim post As BlogPost1
        Set post = b1.GetPost(0)
        publish = 1
        success = b1.DeletePost(post.postId, publish)
        If (success = 1) Then
            MsgBox "Deleted post!"
        Else
            MsgBox "Failed to delete post"
        End If
    End If

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Print | posted on Friday, September 23, 2005 5:22 AM |

Feedback

No comments posted yet.
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: