[ meta Category ]
April 03, 2002

Success!

Okay...some success. I was able to get my website to talk to Hawaii Stories. First thing you gotta do is get an AppKey, which is something like a GUID that identifies your application to Blogger, or in our case, the Hawaii Stories' MovableType API.

You can get an appkey from here:

http://plant.blogger.com/api/register.html

Once you have your AppKey, the next thing you need to do is create a XML string that tells the MovableType API what to do. For example, to get a listing of Blogs on hawaiistories.com, you would send the following XML string:

<?xml version=""1.0""?>
<methodCall>
<methodName>blogger.getUsersBlogs</methodName>
<params>
<param><value><string>
EA987FD001B3617195B27A8A1F3B3A0BCDDE43
</string></value></param>
<param><value><string>
YourUsername
</string></value></param>
<param><value><string>
YourPassword
</string></value></param>
</params>
</methodCall>

And which point, HawaiiStories will respond with:

blogid2
urlhttp://www.hawaiistories.com/
blogNameHawaiiStories

and basically says:

blogid = 2
url = http://www.hawaiistories.com/
blogName = HawaiiStories

Posting and getting info from the weblog is done basically the same way.

I'll create a more functional demo for you all to see.

Posted by Haken at April 03, 2002 03:45 PM

Comments

 
Posted by Haken on April 3, 2002 3:49 PM:

Hey, the thing filtered out all the XML tags. Oh well, use your imagination I guess. Unless someone can explain to me how I can get the "" to stick.

 
Posted by Ryan on April 3, 2002 3:59 PM:

Bravo, Peter! Much of that went right over my head, of course, but... if it means HawaiiStories is even more technologically advanced than I thought, then great!

As for the tags, since HawaiiStories lets you use HTML in posts (though not comments, for now), when it hit the XML code, it just treated it as part of the page. You might have to 'convert' with codes like &quot; and &gt; (to create " and >).

One thing about posting to HawaiiStories via the API, though (and mentioned in the setup FAQ) - there's no distinction between the 'Main Entry Text' and 'Extended Entry Text,' meaning that by default a long post will show up on the main page in its entirety. So if you're posting more than a paragraph of thought, you would probably have to use the HawaiiStories interface to separate out the segments (as I've done for you with this post).

Keep us updated on your progress in this thread! We just might have more blogs wired straight into HawaiiStories someday.

 
Posted by Haken on April 3, 2002 4:30 PM:

Actually, the resposne from Hawaii Stories is also in XML. I just forgot to copy those tags also, but it's not important.

The Extended Entry Text is going to be a problem. How does MovableType differentiate between the Main Entry Text and the Extended Entry Text? Is it something that MovabltType paste together?

Or is there something I can do with the Main Entry Text to have MoveableType automatically break it down into two pieces?

 
Posted by Ryan on April 3, 2002 5:04 PM:

I'm not sure. The Blogger API is still in its infancy, and doesn't by default accept that many variables. The support boards for Movable Type have questions like this, but no quick answers.

One idea (that would be implemented on your end) would be to have the setup send only an {x} word excerpt from the full post (if the total length is more than {y} words), then include in what's sent to HawaiiStories a link back to the full entry on your site.

I don't know, though. I imagine it gets more complicated than that. Especially given also that you probably won't want _every_ post you make to your own blog to be registered at HawaiiStories.

 
Posted by Haken on April 3, 2002 7:49 PM:

Actually, I already have something like that written where only the first paragraph from my weblog will be posted on Hawaii Stories. That should do the trick.

I'm working on the edit portion now, so that if I edited my weblog, the first paragraph will be updated on Hawaii Stories as well. I should have a demo ready tomorrow.

 
Posted by Linkmeister on April 4, 2002 8:16 AM:

Hoo boy, I recognize this syndrome...programmer's disease! "Wouldn't it be cool if...?" I've suffered from it for years! :)

Post a Comment

Name:


Email Address:


URL:


Comments:


Remember info?



« Help needed. | Space Parties »
[ HawaiiAnswers.com - You ask, Hawaii answers. ] [ HawaiiAnswers.com - Hawaii's first online news source. ] [ HawaiiAnswers.com - Let's talk story. ]
Main Page  ::  © 2002-2004 HawaiiStories  ::  E-Mail