2006-01-16

blogger api test

This entry was originally published at 抓~ 抓到一隻瞌睡蟲

這是測試Blogger API Client

你可以到 抓~ 抓到一隻瞌睡蟲 Blogger 分站看到
相同的文章.

Blogger API Client本身是有些bug的… -_-|||
設定方法如下

In bac.php

$bac_username = “<your_username>“; // your username at your Blogger instance
$bac_password = “<your_password>“; // and your password
$bac_server = “www.blogger.com“; // the server receiving your crossposts
$bac_path = “/api“; // the path to the xmlrpc engine
$bac_key = “0123456789ABCDEF“; // unnecessary except on blogger.com

另外這是我加的:
加在$bac_key下一行就好了.

$bac_blogid = “<your_blogid>“; // your blog id

修改大約70行處:

global $post, $bac_server, $bac_path, $bac_username, $bac_password, $bac_category, $bac_key;
global $post, $bac_server, $bac_path, $bac_username, $bac_password, $bac_category, $bac_key, $bac_blogid;

大約110行處:

} elseif ($action == ‘post’) {
$bac_ID = $blog->newPost(”a”, $entry, true);
$bac_ID = $blog->newPost($bac_blogid, $entry, true);
bac_map_set_blogger_id($ID, $bac_ID);
}

UPDATED:

edit action的地方可能也要做修改,有空再說。

沒有留言: