About Me

Open Parenthesis is a blog about free and open source software, next generation internet strategy, and the assembled web, written by John Eckman (me).

John Eckman

I'm a Sr. Director at Optaros, a professional services firm offering strategy, design, development, and consulting services to enterprises interested in leveraging free and open source software.

Optaros Labs

More about me

More About Open Parenthesis

Contact Me

Optaros

Travel

 

Upcoming Conferences

Gilbane Boston

Web Content 2009

SXSW Interactive, 2009

My Tweets

Powered by Twitter Tools.

Optaros Blogs
Creative Commons
Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 License.
April 22, 2008
« Previous Post: Google OpenID
Next Post: BarCamp Boston 3 »

WordPress to Facebook and Back Again

Tagged with: , , , , , , — John @ 6:50 pm

I was really intrigued by Dave Lester’s WPBook plugin, which lets you bring posts from your wordpress blog into an application in Facebook.

I really wanted, though, for users to be able to comment on blog posts from inside Facebook, with their Facebook identities, and have it work like the OpenID comment plugin (in the sense that the user should not need to provide any authentication info, but it should be derived from their Facebook login).

I think I’ve finally got it it nailed, at least to the point where folks can start testing it.

If you are a Facebook user, go to this application page: http://apps.facebook.com/openparenthesis/

It will require you to log in (or already be logged in) to Facebook, but you don’t have to add the application to your profile or spam all your friends.

What you’ll see is my five most recent blog posts from this blog, inside a Facebook wrapper. (Can’t include embedded videos, the styles are bit wonked, etc - but it is a start. This is basically just Dave Lester’s plugin).

You should also (this is the new part I’ve hacked in) see the ability to comment on posts - without being asked for a name or url or email address.

Please leave me a comment to test it out. It should, if all works according to plan, pull your Facebook profile pic as your avatar for the comment as well - since your facebook profile page is actually an hCard with appropriate markup (go microformats!).

I believe this will work even for folks who are not “friends” of mine in facebook - but let me know if you run into difficulty.

Once I’ve validated that it works I’ll publish the code. It required me to add at least one file to my theme, and relies on the hAvatar plugin to get the profile pic.

Known Issues:

Sometimes the “autoresize iFrame to content size” bit in Facebook fails, and you end up with a fixed size view into longer content, with no scrollbars. Haven’t figured out what triggers that yet - standard facebook javascript api.

Sometimes you’ll get the “You’re entering comments too fast” error - just wait 30 seconds. Unless lots of people are all trying to do it from facebook at once this should go away. I’ll need to figure out how to unthrottle the comment queue in wordpress for this point.

Trackback url for this post: http://www.openparenthesis.org/2008/04/22/wordpress-to-facebook-and-back-again/trackback

9 Comments for this post
Chris O'Rourke Says:

This is an incredibly cool plugin/app. I can’t wait till you have all the bugs worked out and I can use it with my blog as well. Hell A version optimized for wpmu would kick even more ass.

terry Says:

hmm. i’m guessing i’m dumb. i added the app, but where do i go to post a comment?

John Says:

Terry - you were probably having the “auto resize iframe to content height” problem - when that fails, you can’t see the comment form at the end of the blog post, or the other four blog posts.

It’s just a simple javascript call, so I can’t figure out what makes it inconsistent - I will ask on the facebook developer forums.

Terry Heath Says:

@jeckman - I get the auto resize iframe on ff3b5, but on safari it looks good. Just put one of those “coded for Safari” badges up? ;)

Terry Heath Says:

Interestingly, after posting a comment, it redirected to your site (url is reading openparenthesis.org), and the page exceeds the window but there’s no scrollbar.

http://skitch.com/terrbear/knn7/facebook-blog-application

I got down to where I am by just selecting the text and dragging it towards the bottom of the window. The facebook-auth thing is really cool, though. I like my pic just showing up without any effort.

John Eckman Says:

Hmm. Interesting how the behavior varies across browsers. Will need to spend some tweaking time - may have to wait till this weekend.

Joe Schueller Says:

Interesting that the 1st time I hit it (FF3b5 on Leopard) the frame didn’t render right, but 2nd time I hit the app, it loaded fine.

Joe Schueller Says:

Got this error on submit:
Assert failed: unknown connection id
Break into debugger?

CDC’s weekly links list Says:

[...] Open Parenthesis » WordPress to Facebook and Back Again [...]

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

« Previous Post: Google OpenID
Next Post: BarCamp Boston 3 »