Mac Help Forums


Reply
Thread Tools Display Modes

Blogger API Issue.

 
Member
Join Date: Jun 2010
Posts: 24
 
      14th March 2011
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?
.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Blogger API Issue kmancat AppleScript 0 14th February 2007 02:11 PM
.htaccess, blogger & purplecloud.net X Kyle M Thompson UK Macs 1 9th February 2006 10:03 AM
blogger paul.urmston@gmail.com Apps 0 11th October 2005 08:18 PM
Looking for an intranet blogger Steve UK Macs 4 9th October 2004 01:19 AM
Looking for an intranet blogger Steve UK Macs 0 8th October 2004 07:01 PM


All times are GMT +1. The time now is 08:36 PM.
Mac-Help.com is an independent website and is not affiliated with Apple Inc.


Welcome!
Welcome to the Mac Help Forums
 


Latest Threads
MacBook
basil422 (2 Hours Ago, 06:01 PM)

Outlook reminders not popping up
WonderBot (3 Hours Ago, 05:03 PM)

Help with Windows 7
Kjerste (8 Hours Ago, 12:32 PM)

NO Sound - no input or output devices found
osxlion (19 Hours Ago, 12:58 AM)

Using Terminal to move my iTunes and GarageBand libraries to an external?
corbytender (21 Hours Ago, 10:51 PM)

 


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51