Visual Basic sample code using the Tortuga MetaWeblog ActiveX to edit an existing blog post.
The Tortuga Beta ActiveX can be downloaded from
MetaWeblog ActiveX
The download contains an ActiveX DLL that needs to be registered using regsvr32.exe. You may then import the "Tortuga ActiveX" into your VB project.
' Use the Blogger 1.0 API to get the Blog ID
Dim b1 As New Blogger1
b1.Login = "myLogin"
b1.Password = "myPassword"
b1.ServiceUrl = "http://www.squarespace.com/do/process/external/PostInterceptor"
b1.GetUsersBlogs
blogId = b1.GetBlogId(0)
' Use MetaWeblog to edit a post
Dim mwlog As New MetaWeblog
mwlog.Login = "myLogin"
mwlog.Password = "myPassword"
mwlog.ServiceUrl = "http://www.squarespace.com/do/process/external/PostInterceptor"
' Download the 10 most recent posts
nPosts = mwlog.GetRecentPosts(blogId, 10)
' The most recent post is at index 0, the oldest post is at index nPosts-1
' This example will change the title of the most recent post.
newTitle = mwlog.GetRecentPostTitle(0) + " XYZ"
postId = mwlog.GetRecentPostId(0)
postContent = mwlog.GetRecentPostDescrip(0)
publish = 1
success = mwlog.EditPost(postId, newTitle, postContent, publish)
If (success = 1) Then
MsgBox "Success!"
Else
MsgBox "Failed to edit post"
End If