MetaWeblog API
From PixyWiki
Contents |
Overview
The MetaWeblog API is a popular API which allows blog entries to be posted, edited, and deleted using web services. You can find more information on the API on the following websites:
Supported blog clients
A number of web applications and blog clients support the API. Just some of these are listed below:
Windows
Mac
Linux
Web browser based clients
- Flock
- Deepest Sender Firefox
- Scribefire Firefox
iPhone
Symbian
Web services
Using a blog client
A blog client allows you to post to PixyBlog remotely, from your computer, phone or from some other websites. You can see some examples of these above.
Configuring a blog client
First, make sure to enable Blogger API support in your weblog via the Preferences:Settings page. Next, start your blogging client, find the preferences or account setup dialog. You'll need to set the following parameters:
- Username: your PixyBlog username
- Password: your PixyBlog password
- BlogID: the handle of your blog
- URL: the URL of PixyBlog's XML-RPC endpoint
Note: You may not need to enter your BlogID because some blog clients will login to PixyBlog and then present you with a list of the weblogs that are available to your user.
An example
For example, if your username is fred and your blog's handle is fredsblog (i.e. your weblog's URL is http://fredsblog.pixyblog.com), then your parameters would be:
- Username: fred
- Password: (your password)
- BlogID: fredsblog
- URL: http://www.pixyblog.com/roller-services/xmlrpc
Note: You may not need to enter your BlogID because some blog clients will login to PixyBlog and then present you with a list of the weblogs that are available to your user.
Posting from Flickr
Flickr supports postings photos as blog entries. It's easy to get your Flickr account set-up to post your photos to your PixyBlog, just follow these steps:
- Login to Flickr and go to "You > Your Account > Extending Flickr"
- Add a new blog using the following option: MetaWeblogAPI Enabled Blog.
- Enter your pixyBlog information as described above.
- Don't worry about pressing the "Test Post" button (see below).
- Customize your Flickr Layout (see below).
- Go to one of your photos on Flickr and you should now have a "Blog This" button... try it!
Note: "Test Post" button on Flickr will fail. This is OK, because the test post from Flickr doesn't contain an image, which is required by PixyBlog.
Customizing Flickr blog layout
Flickr has a number of templates used to add additional formatting to your blog entries. Because your PixyBlog already has it's own theme, we're not interested in getting the additional formatting information, so we recommend you create a custom layout. From "Your blog list" in Flickr, choose "Layout", select any of the templates and then select "Customize" and use the following code in your template:
<img src="{photo_src}" />
{description}
Note: Flickr currently only supports photos up to 500 pixels in size for blogging.
Posting to Photoblogs
Note: this only effects photoblogs, not text blogs.
The MetaWeblog API does not directly support the uploading of image files to accompany a blog post. So for photoblogs at PixyBlog, where each post requires an image, the API has been adapted to support images by scanning the content (aka body or description) of the post for any JPEG image links. These images will then be uploaded to your photoblog and as long as they are JPEG's and at least 500 pixels in size. They will then be used as the image(s) that accompanies the post. Finally, the image tag is removed from the content of the post.
An example
Post the following as the content of a post:
<img src="http://farm4.static.flickr.com/3575/3361346538_788e111334_b.jpg"/> <p>The castle at Disney</p>
This will upload the JPEG image to the photoblog and the description for the entry would be:
<p>The castle at Disney</p>


