Blogger API Issue.


aaabha

New Member
Joined
Jun 26, 2010
Messages
24
Reaction score
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?
.
 

Ask a Question

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. After that, you can post your question and our members will help you out.

Ask a Question

Top