Alfresco and Ringside

I’ve made moderate progress getting Alfresco and Ringside integrated. If you haven’t played with it yet, Ringside Networks is an open source project that essentially gives you a standalone Facebook server. There’s actually more to it than that, but for this conversation, what matters is that Ringside supports the Facebook API and FBML without requiring a connection to Facebook.My goal is to get the Alfresco Facebook “Document Library” example (screencast) working in Ringside. What I have working now is single sign-on between Alfresco and Ringside, the main web script, the document library creation web script, and the document libraries list web script (pictured). What isn’t working so well (yet) is the file upload.

If you want to try this yourself, you’ll need:

  • A working install of Ringside Networks Social Application Server (Advanced Developer Setup instructions) which requires PHP and MySQL
  • A working install of Alfresco Community
  • The Facebook AMP (or just the web scripts from the AMP) or your own set of Facebook runtime web scripts
  • Alfresco Community SDK & Source

Alfresco has hardcoded Facebook URLs into the FacebookAuthenticatorFactory and FacebookModel classes. You need those to point to your local Ringside server instead of Facebook. I created a RingsideAuthenticatorFactory which is just a dup of FacebookAuthenticatorFactory with LOGIN_REDIRECT changed to:

"<fb:redirect url=\"http://localhost/api/login.php?api_key=%s&v=1.0%s\">"

You’ll need to override the webscripts.authenticator.facebook bean with a pointer to the new class, like so:

<bean id="webscripts.authenticator.facebook" class="com.optaros.ringside.RingsideAuthenticatorFactory" />

I took a more hackish approach to the FacebookModel. I removed Alfresco’s class from alfresco-webscript-framework.jar and replaced it with my own version that has updated getCanvasURL and getPageURL methods:

public String getCanvasURL() {
return "http://localhost/web/canvas.php/" + getCanvasPath();

public String getPageURL() {
return “http://localhost/web/canvas.php/” + req.getPagePath();

At some point, what should really happen is that all of these URLs should be pulled out into a config. Once I get everything working, maybe I’ll circle back with a better step-by-step and perhaps the changes can be submitted to Alfresco so that it is easier for people to choose whether their Facebook web scripts run against Facebook or a Ringside server.