Wednesday, 9 November 2011

Howto use Picasa API with Blogger API

When you use the blogger api, the pages you get back contain a type of tag called 'gd:extendedProperty'. These contain some useful data.

Just do an http get to: <blogurl>/feeds/posts/default

So, for this blog you are reading:

This will return a big mess o' xml, including the tags:

<gd:extendedProperty name='IS_PUBLIC_BLOG' value='true'/>
<gd:extendedProperty name='PICASAWEB_ALBUM_ID' value='5570923802870618657'/>

It turns out that one of these (PICASAWEB_ALBUM_ID) is a link to the Picasa album that is used by your blog.

You can use this link to upload pictures using the picasa api documented here

When you do the upload you'll get back another mess-o-html which will include a tag called 'content'. This should give you the 'web visible' link for the image, which you can now use in posts to your blog.

No comments:

Post a Comment