Visual Basic sample code using the Tortuga MetaWeblog ActiveX to download recent posts from a blog server and modify a 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 = "login"
b1.Password = "password"
b1.ServiceUrl = "http://www.squarespace.com/do/process/external/PostInterceptor"
b1.GetUsersBlogs
blogId = b1.GetBlogId(0)
' Use MetaWeblog to modify a post.
Dim mwlog As New MetaWeblog
mwlog.Login = "login"
mwlog.Password = "password"
mwlog.ServiceUrl = "http://www.squarespace.com/do/process/external/PostInterceptor"
' Download the 10 most recent posts
nPosts = mwlog.GetRecentPosts(blogId, 10)
' Get the most recent post as an object.
Dim post As BlogPost1
Set post = mwlog.GetRecentPost(0)
' Note, calling mwlog.GetPost(postId) re-fetches a single post from the server.
' Calling GetRecentPost(index) simply fetches one of the recent posts already downloaded.
' Modify something
post.Title = "this is the new title ***"
' Upload the changes.
publish = 1
success = mwlog.UploadChanges(post, publish)
If (success = 1) Then
MsgBox "Changes Uploaded!"
Else
MsgBox "Failed to upload changes!"
End If