Ngeblog 0.1 (Now support ClientLogin Authentication for both versions of Blogger)

Good news for Blogger Beta users, now Ngeblog can be used to manipulate your blog entry. 🙂

If you’re using previous version of Ngeblog, don’t worry, you still can use all the methods as before, only now you can do more. Especially if you’re using Blogger in beta version.

As usual, i’m going to blab on a bit about this newest version, so if you can’t wait any longer to play around with it (i know some of you are like that) just go here and try it out yourself.

Ok, here are some additional features in Ngeblog 0.1 :

ClientLogin Authentication

As clearly stated in Blogger Data API documentation, now ClientLogin authentication can be used for both versions of Blogger. That surely makes our lives easier.

Unfortunately, previous version of Ngeblog still used BasicAuth for its authentication method, which is only valid for current version of Blogger, not for Blogger currently in beta . That’s why you need to download Ngeblog ver. 0.1 to be able to access Blogger in Beta version.

In implementation case, there’s nothing new in Ngeblog. You put some parameters (username and password) in constructor to connect to Blogger, like this:

<?php

  $username = "yourusername";
  $password = "yourpassword";

  $myblog = new Ngeblog($username,$password);
  $bloginfo = $myblog->getBlogInfo();
  print_r($bloginfo);

?>

Only now, Ngeblog will try to detect whether you’re trying to connect to current version of Blogger or beta version. And all authentication is done using Google ClientLogin method.

Multiple Blogs Shorthand

As i mentioned in previous post, Blogger allows you to have more than one blog per account, and each blog has its own Blog ID. Ngeblog supports multiple blogs access by defining which blog ID are you trying to access.

Thanks to Bill, now you don’t have to carry Blog ID in all methods like before, you just need to define it once in constructor, like this:

  $username = "yourusername";
  $password = "yourpassword";
  $blogid   = "81928938";

  $myblog = new Ngeblog($username,$password,$blogid);

then the rest of methods will assume you’re manipulating blog ID 81928938 without having to define it in all methods. For example to add new post, you just have to write something like this,

  $title   = "My Title";
  $content = "My content for this blog";

  $myblog->newPost($title,$content);

If you need to switch to another blog in the middle of your scripts, use setActiveBlog() method, like this:

  $anotherblogid  = "84748478";
  $anothertitle   = "My Title for another blog";
  $anothercontent = "My content for another blog";

  $myblog->setActiveBlog($anotherblogid);
  $myblog->newPost($anothertitle,$anothercontent);

Tester

Enough talks, if you still can’t understand what i’m talking about here, check out the tester here, i build it with Ngeblog 0.1. Just enter your username and password whether for current version or beta version of Blogger.

Join the Conversation

4 Comments

  1. you’re such a great man. it’s nice to hear class to support blogger beta. also multiple blog support now better.keep good work. thanx.

  2. i was just testing your code with test.php. but it doesn’t work. always gives authentication failure. 🙁

  3. i tried 3 different accounts. 2 of them blogger are accounts and one of them is blogger beta account.

    i also logged in successfully at blogger.com
    v0.1
    gives this error:

    Failed to authenticate, Google Authentication returns error :

    no problem with Ngeblog v0.0.4

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.