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

MetaWeblog API VB Example: Fetch Post, Make Changes and Update

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
    
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Print | posted on Sunday, September 25, 2005 11:33 AM |

Feedback

Gravatar

# re: MetaWeblog example

check right or not
11/16/2005 11:56 PM | saga
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: