wesley tanaka

How to post to metaweblog with Drupal's xmlrpc()

‹ Emergency Brake vs. Parking Brake vs. Hand Brake | Bonferroni's Principle ›
()

Example code showing how to use Drupal API's support for xml rpc to post an item to a blog which supports the metaweblog XML-RPC api:

xmlrpc('http://blogs.www.friendster.com/t/api', 'metaWeblog.newPost', '31337', 'example@example.com', 'sample password', array('title' => 'drupal xmlrpc and metaweblog.newpost tutorial', 'link' => 'http://wtanaka.com/node/7746', 'description' => 'sample code for using xmlrpc and metaweblog.newpost in drupal'));

Note in this example that friendster's XMLRPC API url is blogs.www.friendster.com, not www.blogs.friendster.com as is claimed in some places.

Suggested Links

Code placement

Where is this code supposed to be added in the drupal system?

Syndicate content