Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Tiernan McAlister
Tiernan McAlister
6,817 Points

Receiving Blog Posts From WordPress in Eclipse

Hi Everyone,

I have just finished completing the "Build A Blog Reader Android App" stage in Treehouse (which was awesome), and I was wondering if it would be possible to change the code to receive blog data from a Wordpress.com blog instead.

The blog I have is one of those free sub-domain type ones, and doesn't allow plugins to be installed. I was wondering if there is a way of receiving data from the blog in a JSON manner, similar to the way that Ben does in the last Android tutorial, and then organizing that JSON data within an Android app. I'm not sure if I need to install a WP library or something else in order for Eclipse to understand the objects and code I will use to retrieve data from WP.

So far I've looked at the WP API reference, found here: http://codex.wordpress.org/WordPress_APIs and a short tutorial (below) on using XML to receive data, but it doesn't seem to be using Eclipse. http://wp.tutsplus.com/tutorials/creative-coding/xml-rpc-in-wordpress/

This might all sound very confused and I might be in over my head on this one, but any direction or tips on this would be great. I'm on a tight budget over the next few months and don't think I will have the cash for a self hosted Wordpress.org blog. So if the .com blog is not possible, then any relatively cheap alternatives that you may have would be of great help too.

Many thanks, Tiernan

2 Answers

Alexander Smith
Alexander Smith
2,769 Points

http://developer.wordpress.com/docs/api/

That should point you in the right direction.

Another idea you could look into is a RSS reader kind of app.

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

Also, check out @Amit's reply in this other forum post. This is the JSON API plugin we use for our blog, and you can customize the heck out of it. You might even be able to adapt your own blog's JSON feed to match the same format we use in our app. :smile:

http://teamtreehouse.com/forum/parsing-rss-instead-of-json-info