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

Movable Type - Assign new category to existing post (Visual Basic code)

Visual Basic example program using the Tortuga Movable Type ActiveX Component to assign an additional category to an existing post.
The Tortuga Beta ActiveX can be downloaded from Tortuga 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.
The DLL contains objects for RSS, Atom, Blogger 2.0, Blogger 1.0, MetaWeblog, Technorati, Yahoo! Site Explorer, and Web Search.
Tortuga Components Home


    ' Use the Blogger 1.0 API to get the Blog ID
    Dim b1 As New Blogger1
    b1.Login = "admin"
    b1.Password = "***"
    b1.ServiceUrl = "http://www.someblog.com/blog/xmlrpc.php"
    b1.GetUsersBlogs
    blogId = b1.GetBlogId(0)
        
    Dim mt As New MovableType
    mt.Login = "admin"
    mt.Password = "***"
    mt.ServiceUrl = "http://www.someblog.com/blog/xmlrpc.php"
    
    ' Get all the possible categories for this blog.
    mt.GetCategoryList blogId
    ' Assume there is a category named "movies".  Get the category ID...
    categoryID = mt.GetCategoryIdByName("movies")
        
    ' Get the categories for the post with the post ID = "4"
    postId = "4"
    mt.GetPostCategories postId
    
    ' Add the "movies" category to this post.
    isPrimary = 0
    mt.AddPostCategory categoryID, "movies", isPrimary
    
    ' Now update the server with the new categories.
    mt.UpdatePostCategories postId

Print | posted on Wednesday, October 05, 2005 7:27 PM |

Feedback

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

Powered by: