By John Eckman on March 7, 2010
WPBook
So for a while I’ve been working on and beta testing the next version of WPBook. Tonight I’ve just tagged it for release, so it will be available for download shortly. (I’ve already been running it here for a while and testing it on a few other test blogs).
The main improvement in WPBook 1.5 is that it now knows how to use stream.publish, meaning that it will automatically post to your wall in Facebook when you publish a post in WordPress. Your friends should see that notification as well in their streams. (We’re not, however, sending application updates or tracking all users’ user id’s – instead you enter your own userid into the settings and it uses that to post to your wall). Included are attachments (first image attached to the post is used) and excerpts (if you hand craft excerpts they will be used in the wall post).
The other main improvement is that WPBook now requires PHP5, and as such can wrap Facebook calls in Try/Catch blocks. For the non-programmer, this means those awful, dramatic “fatal uncaught exception” error screens are gone. WPBook isn’t doing anything terribly meaningful with those errors yet – still working on that- but at least it traps them.
In this release:
- WPBook now requires PHP 5
- Enables user to post to stream, including to pages. (Must be pages for which you are the admin, to which you have added the app, and which have granted stream.publish permission – link provided in the admin to grant permissions.
- Catches exceptions thrown by the Facebook client. (Doesn’t yet surface those in good error messages, but at least they are caught)
- Fixed, I hope, issue with comments inside Facebook for some users
- Clean up of some admin styles (resized gravatar images as well as some basic hierarchy on options)
- Added Page Options as their own section
- Allow user to select pages to be excluded
- Added option to allow a menu of parent pages at top of the app below the title
- Fixed “Facebok” typo in line line 182 of theme/index.php
- Option to turn on and off page list under content (independent of menu)
- Option to turn on/off recent post under content
- Allow user to set the amount of recent post to show under content (default 10)
- Cleaned up custom header/footer now only one function instead of two (no reason to have two functions)
- Added %tag_links% and %category_links% to custom header footer as well as made archive pages work.
- Set smart default for when Blog Title isn’t set
Next steps?
- Better error handling code – do something with the messages Facebook returns when an exception is thrown
- User selectable theme directory – for users who’ve taken the time to customize their theme
- Threaded comments – likely means requiring WP 2.7, though for error handling (and just simplicity) I’m thinking of jumping right to WordPress 2.8
- Cross-Posting to a commenter’s wall when they comment inside Facebook. (Because it is in response to a user action, I understand they don’t even have to grant stream.publish permission).
What else would you like to see?
Update: Closing comments on this post. For troubleshooting please use the support forums instead.
Posted in blog, facebook, Open Source, Optaros, social media, Stream.publish, Syndicated, WordPress, WPBook | Tagged openparenthesis.org
By John Eckman on January 4, 2010
(Update 1/14 – now 1.4.2. Fixes detailed in readme – Admin side javascript issue, issue with submitting comments for folks who install wordpress files in a subdirectory different than their root URL)
(Updated 1/5 – it’s actually 1.4.1 now, as there was a typo in the theme/index.php file – get_exteral_url should be get_external_url).
Last night I packaged and released version 1.4 of WPBook, the plugin I maintain which creates a view of your WordPress blog as a Facebook application.
(For example, see Open Parenthesis as a blog, and then Open Parenthesis as a Facebook app).
Highlights of this release
As you can see, this was really more of a bug-fix and code cleanup release, with one experimental functional addition (pages). The one feature I didn’t get to but wanted to was threaded comment support (as in WordPress 2.7 and later). Would users want to be able to set threading differently inside Facebook than outside it? (I’m thinking that WPBook should just follow the settings in the blog it is installed to, with respect to threading – and perhaps gravatars as well, given how integrated with WordPress gravatars have become).
The next version will be more of a “feature set” release, and will also be the first version to require PHP 5. Although Facebook only officially supports a PHP 5 client library, I’ve been supporting PHP 4 by relying on an open source PHP 4 Facebook client.
The problem is that many of the operations most requested by users rely on Facebook API calls which sometimes fail. The PHP 5 client handles this by throwing exceptions, which WPBook needs to catch – something PHP 4 can’t do.
What’s coming in 1.5
Here’s my tentative roadmap:
- Threaded Comments – which may mean upping the minimum WordPress to 2.7 for simplicity’s sake. Given that we’re at 2.9 now I think that’s ok.
- More work on Pages. Need to be able to list pages not to show inside Facebook, enable user to set page depth, maybe even show the top level pages as Facebook style tabs across the top of the application? (tricky inside an iFrame app)
- PHP 5 required – this will allow me to trap “uncaught exceptions” which sometimes occur when users submit new blog posts. It’s a cosmetic error but a really ugly one which it happens, and as I use more and more Facebook calls it may happen more often.
- Publish to Facebook’s Stream.publish API when a new blog post is published – this is the most commonly requested feature. (Is it fair to assume the blog author is also the owner of the Facebook application? I had assumed so but that may not be the case – may require the user to enter his/her Facebook UID in WPBook for publishing to the stream)
- Enable publishing to the wall of a Facebook “page” as well as a userwhen a new blog post is published.
- Enable users leaving comments to also publish to the Facebook stream- has to be at the user’s discretion, but WPBook could offer to publish comments both to the stream of the user publishing the comment and to the blog author’s stream.
What else would you like to see in WPBook 1.5? (Not that these aren’t enough).
I’ve also got to start thinking about WordPress 3.0 and the merge with the WPMU codebase, and what impact that has, but I’m hoping that can wait for WPBook 1.6.
Posted in API, application, facebook, Open Source, opensource, Plugin, Syndicated, WordPress, WPBook | Tagged openparenthesis.org
By John Eckman on November 14, 2009
Here’s the slides from my presentation this morning at WordCamp NYC. It was in the “beginning developer” track so I tried to focus on the overall structure of how the plugin does what it does and the hooks/actions/filters used.
Hard to fit the talk into 30 minutes with time for questions and roadmap – there’s so much more I want WPBook to do – hopefully I can find the time soon.
I also took the opportunity, naturally, to promote WordCamp Boston, coming January 23rd. See you there?
Looking forward to watching sessions the rest of today and volunteering this afternoon / tomorrow. If you’re here, stop me and say hello.
Posted in Boston, Development, facebook, nyc, Open Source, Optaros, Plugin, Syndicated, wcnyc, WordCamp, WordPress, WPBook | Tagged openparenthesis.org