WordPress: Seesmic Plugin
This was a fun project! With the API for Seesmic launching, I was chomping at the bit to post my videos on my blog so folks could see more videos from me. Utilizing the same architecture as some of the other WordPress plugins I’ve built, I built out a Seesmic WordPress plugin.
This plugin was different because it required me to decode JSON and work quite a bit more with multi-dimensional arrays and PHP. Sorry if that sounds like greek to you… here’s some explanation.
What’s an API?
When you type a URL into your browser’s address bar, what actually occurs is that you make a request to the server you’re trying to reach and then that server serves up the HTML and images to make the page. An API does the same thing - only the page you’re on (AJAX) or the server that your page is served from makes the request.
Instead of serving HTML and images, though, the API serves back XML, or eXtensible Markup Language or most recently, JSON. Simply put - where HTML is made to be viewed by a human, XML and JSON are designed to be consumed by a computer. It’s a strict construction of data that is returned.
APIs are useful because you can integrate your applications into others. If you build a new application out of an API, that’s typically known as a Mashup.
New technologies require new platforms
PHP5 enhanced PHP’s abilities to consume XML and JSON (SOAP-based Web Services are next!). Trying to parse XML and JSON without PHP5 on a Linux host was cumbersome and took a lot of code and resources. I would never recommend it.
I wrote this plugin using the json_decode method within PHP5.2+ since the Seesmic API’s first evolution is JSON. This function simply takes the JSON returned and throws it into an array or multi-dimensional array that can be parsed just as any array can. Arrays can be complex (it drove me nuts this afternoon), but once you understand the structure, they’re very easy to use.
Douglas Karr

Parse error: syntax error, unexpected ‘{’ in /home.32/c/i/s/ciscosho/www/wp-content/plugins/wpseesmic/wpseesmic.php on line 65
can you help to resolve this problem
thanks
cisco
The requirements call for PHP 5.2+. This version is necessary because it has built in JSON decoding, which is required for the Seesmic API. You’re probably running PHP4… check with your hosting company to get upgraded.
If you’d like to check what version you’re running, make a blank php file on your site and put:
<?php phpinfo(); >
It will display what version you are running as well as whether cURL is enabled.
Doug
I’ve not added it as a posting mechanism yet, but it’s on the list! Just a note to everyone - I just pushed version 1.0.2 which now has a link to the original video if your video was a reply.
Cheers,
Doug
Love the concept behind this plugin but I have some difficulties in using it.
Do you have any idea why I get this http://tinyurl.com/27zrw9
Once activated, what I get in the options menu is what you see in the screenshot
Andrea
http://www.flickr.com/photos/vascellari/2387250996/sizes/o/
Now I’m going to send you a video on seesmic too.
Andrea
The plugin requires PHP 5.2+ and cURL enabled. cURL is usually enabled by default and won’t cause this issue.
Doug