C# sample code using the Tortuga MetaWeblog .NET API to create and upload a new blog post.
The Tortuga Beta .NET Component can be downloaded from
MetaWeblog .NET
The download contains an .NET class library (DLL) that needs to be referenced from your C# or VB.NET project.
// Use the Blogger 1.0 API to get the Blog ID
Tortuga.Blogger1 blogger1 = new Tortuga.Blogger1();
blogger1.Login = "tortuga";
blogger1.Password = "myPassword";
blogger1.ServiceUrl = "http://www.squarespace.com/do/process/external/PostInterceptor";
bool success = blogger1.GetUsersBlogs();
if (!success || (blogger1.NumBlogs == 0)) return;
string blogId = blogger1.GetBlogId(0);
// Use MetaWeblog to create a new post
Tortuga.MetaWeblog mwlog = new Tortuga.MetaWeblog();
mwlog.Login = "tortuga";
mwlog.Password = "myPassword";
mwlog.ServiceUrl = "http://www.squarespace.com/do/process/external/PostInterceptor";
string postId;
bool publish = true;
postId = mwlog.NewPost(blogId, "MetaWeblog .NET API", "Posted from the Tortuga MetaWeblog .NET API", publish);
MessageBox.Show("This ID of the post created = " + postId);