Sometimes you want to get access to your Wordpress content (blog posts, pages, categories, etc) from external sources. for example if you want to use a different front end such as Flash, or edit your posts from different software (such as the Flock Browser).
Wordpress allows you to do this using Wordpress XML-RPC which are remote function calls using XML. If you are using Action Script (say via Flex) there is a as3 xml-rpc library you can use to make this simpler. As noted in my previous post, the library requires a small tweak or you can download my recompiled as3 xml-rpc library file. You need to put this in the libs directory in your project.
A typical call to Wordpress might be: makeCall(“metaWeblog.getRecentPosts”,[_blogid,_user,_password,count]). After doing some research the blog id isn’t used by a non-MU Wordpress website so I just put ‘1′ in there.
Here’s another good tutorial on using XML-RPC with Flex. You can get more information on what is XML-RPC.
To set up an inexpensive website that you can easily maintain yourself, as well as building email lists, shopping carts or membership sites, please see our internet consulting services.
No Comments »
If you’re a developer you’ve probably been frustrated with the concept of using a movie/timeline concept with keyframes in order to create a website or application. While it might be fine for animations it never made sense to me to use it for more static type applications.
Luckily Adobe came up with Flex 3 which also runs within the Eclipse IDE for developing rich internet applications.
I’ve recently been working with it to connect to Wordpress for its data (rather than hardcoding the content in the application or using some other database) using the XML-RPC apis. Luckily there is an api for use with Flex over at Google code.
Of course right off the bat, we hit a snag – the api doesn’t work with Flex 3 without making code changes to the api and recompiling. Surprising since the api’s been out for a while. So I extracted the api zip file into a directory and went into a DOS command line and ran the following (using a flex executable from the install directory):
C:\Documents and Settings\Owner.WILL\My Documents\Workspaces\rpcLibrary>”c:\Prog
ram Files\Adobe\Flex Builder 3\sdks\3.2.0\bin”\compc.exe -source-path .\src -nam
espace http://ak33m.com/mxml .\src\manifest.xml -include-namespaces http://ak33m
.com/mxml -output=.\bin\as3-rpclib.swc
basically you’re using the compc.exe file wherever you installed flex. I ran this from the root of the xml-rpc directory (from the api zip file extraction). So the src directory was a child of this directory. My wordpress flex app now compiles! If you want to save yourself the trouble you can download my recompiled as3 xml-rpc library.
I’ll post more as I make discoveries!
To set up an inexpensive website that you can easily maintain yourself, as well as building email lists, shopping carts or membership sites, please see our internet consulting services.
No Comments »