Blogging and News Syndication Software

Blogger API, RSS API, Atom API, and more.
posts - 17, comments - 14, 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: Edit Most Recent Post

This example program edits the most recent post...
 
   ' Edit the most recent 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
        ' Edit the most recent post, which is always at index 0.
        Dim post As BlogPost1
        Set post = b1.GetPost(0)
        publish = 1
        
        ' We are only changing the title
        success = b1.EditPostWithTitle(post.postId, "This is the new title", post.Description, publish)
        
        If (success = 1) Then
            MsgBox "Successful edit!"
        Else
            MsgBox "Failed to edit post"
        End If
    End If

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

Feedback

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

Powered by: