Blogger API Issue.

Discussion in 'AppleScript' started by aaabha, Mar 14, 2011.

  1. aaabha

    aaabha New Member

    Joined:
    Jun 26, 2010
    Messages:
    24
    Likes Received:
    0
    I'm trying to create a script that interacts with the Blogger API on my Wordpress blog. I have AS Studio application for writing the post, then when you hit send it calls post.scpt with osascript. post.scpt is where my trouble is. Currently, I have 3 preferences files containing the username, password and post content. My code is as follows:

    Code:
    set f to alias "Macintosh HD:iBlogPrefs:iBloguser.txt"
    set myusername to read f
    set f to alias "Macintosh HD:iBlogPrefs:iBlogpass.txt"
    set mypword to read f
    set myappkey to "iblog"
    set myblogid to "0"
    set f2 to alias "Macintosh HD:iBlogPrefs:iBlogcontent.txt"
    set mypost to read f2

    tell application "http://mattholland.com/wordpress/xmlrpc.php"
    return call xmlrpc {method name:"blogger.newPost", parameters:{myappkey, myblogid, myusername, mypword, mypost, true}}


    end tell
    Whenever I run this script I get this error:

    Code:
    http://mattholland.com/wordpress/xmlrpc.php got an error: parse error. not well formed
    However, when I set the username, password and content inside the script, it works fine. Here's the code for that:

    Code:
    set myappkey to "myblogwidget"
    set myblogid to "0"
    set myusername to "kmancat"
    set mypword to "spper"
    set mytitle to "Post 1"
    set mypost to "Post 1"
    set mypublish to true

    tell application "http://mattholland.com/wordpress/xmlrpc.php"
    return call xmlrpc {method name:"blogger.newPost", parameters:{myappkey, myblogid, myusername, mypword, mypost, true}}


    end tell
    Any ideas on why I might get this error, or other ways to pass the script those variables?
    .
     
    aaabha, Mar 14, 2011
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. kmancat

    Blogger API Issue

    kmancat, Feb 14, 2007, in forum: AppleScript
    Replies:
    0
    Views:
    1,446
    kmancat
    Feb 14, 2007
  2. John Faughnan
    Replies:
    2
    Views:
    287
    John Faughnan
    Jul 17, 2004
  3. paul.urmston@gmail.com

    blogger

    paul.urmston@gmail.com, Oct 11, 2005, in forum: Apps
    Replies:
    0
    Views:
    339
    paul.urmston@gmail.com
    Oct 11, 2005
  4. Shenita Rose
    Replies:
    1
    Views:
    268
    Jamie Kahn Genet
    Sep 21, 2010
  5. Valdemort@hades.gov

    Huge problem with Blogger moderation

    Valdemort@hades.gov, Sep 30, 2011, in forum: Apps
    Replies:
    12
    Views:
    415
    Paul Sture
    Oct 2, 2011
  6. Steve

    Looking for an intranet blogger

    Steve, Oct 8, 2004, in forum: UK Macs
    Replies:
    4
    Views:
    325
    Woody
    Oct 9, 2004
  7. Steve

    Looking for an intranet blogger

    Steve, Oct 8, 2004, in forum: UK Macs
    Replies:
    0
    Views:
    269
    Steve
    Oct 8, 2004
  8. X Kyle M Thompson

    .htaccess, blogger & purplecloud.net

    X Kyle M Thompson, Feb 8, 2006, in forum: UK Macs
    Replies:
    1
    Views:
    367
    James Taylor
    Feb 9, 2006
Loading...