Virtual Karma

Friday, January 06, 2006

30 second tutorial: Post to Blogger from your .Net application

This is a short tutorial that will teach you how to post to a blogger account from your .Net application. The code is in Visual basic.

Sept 1: Use Atomizer

Get Atomizer. Drop Atomizer.dll in the bin folder of your application.

Step 2: Create the Atom instance

atomEndPoint = "https://www.blogger.com/atom/"

generator = New generatorType
generator.url = "http://www.newster.net"
generator.Value = "NewsterToolSample"
generator.version = "1.0"

Dim Atom As Atom
Atom = Atom.Create(New Uri(atomEndPoint), generator, "username", "password")

step 3: Get the services from the Atom instance

Dim services As Array
services = Atom.GetServices()

Dim postURL As New String("")
postURL = service.postURL

Step 4: Post

Atom.PostBlogEntry(postURL, " Title of your article ", "body of your article", "")

Thats it.

Here is a working example and here is the source code for the working example.

I have used the above technique in the first version of Newster.net. For those of you who are not familiar with Newster.net, it’s a news aggregating application. I had shared hosting with Brinkster and it worked just fine. Just drop the Atomizer dll in the bin folder and use the above code.

7 Comments:

  • Nice article. Thanks for sharing.

    By Blogger Peter Gloor, at 10:59 AM  

  • How do I grab the content of a topic?
    EntryType does not have ".Content", it gives me the title and stuff.

    By Blogger ap, at 3:18 PM  

  • This tutorial teaches you how to post to a blogger accout. Is that what you are trying? I have never tried the Atom API to grab contents from a feed (there are ways to do it).

    To post use this function:

    Atom.PostBlogEntry(postURL, " Title of your article ", "body of your article", "")

    the 3rd parameter is the content you want to post.

    By Blogger Rian, at 5:56 PM  

  • Great tutorial I have a blog for web design leeds and its always handy to quickly post.

    By Blogger markali52, at 9:23 AM  

  • If you are looking wow power leveling, buy warcraft gold as well as WOW Power Leveling and World Of wow levelingWhen you need someone to listen,FFXI Gil, I'll be there. When you need a hug, cheap FFXI Gil,I'll be there. When you need someone to hold your hand, I'll be there. When you need someone to wipe your tears, guess what? I'll be there. William Shakespeare

    By Blogger uiyui, at 1:40 AM  

  • buy wow gold,cheap wow gold.buy wow gold,cheap wow gold,power wow power levelingworld of warcrft gold.cheep wow goldworld of warcrft gold.

    By Blogger xiang, at 6:50 PM  

  • very nice!

    By Anonymous Buy wow gold, at 1:09 AM  

Post a Comment



Links to this post:

Create a Link

<< Home