It's finally done. One giant leap for The incredible Roach - towards integrating with facebook. Wait. Roaches don't leap...

It took a while, but I finally made it work. Unfortunately that meant doing away with a nice visual feature - the cool "homepage sliding up to reveal the newsfeed" is gone now. To get that effect, the newsfeed was actually part of the same HTML page as the homepage, just that it was hidden from your view till you clicked on the newsfeed link. A JQuery function would slide the newsfeed pane in while sliding out the homepage one for that effect.

Apart from that, the newsfeed pane itself referred to a separate PHP document that would go dig out all my ramblings here, from a MySQL table. The page then used a JQuery pagination plugin to sort out the result set returned into different pages. Initially, this pagination would show 3 articles on a page.

Once I added in the facebook comments widget, I realized having multiple stories on one page may be a bad idea, as the comments may take quite a lot of space (yes I am a little delusional about how popular my site really is). So I changed the pagination to show only one story per page.

The facebook comments were working fine till I did this - then the entire AJAX pagination mechanism the JQuery plugin was using seemed to confuse facebook. Result: no comments box loading. Since Server-side pagination was always my plan, I ditched the JQuery plugin and carried out the pagination using PHP. But then that didn't work with my cool sliding pane newsfeed. Every time I'd try to move to the next article (page) it would jump back to the homepage pane.

I really liked the sliding panes effect, so I tried out some code I found on the net that uses JavaScript to read the PHP $_GET and load the new PHP within a DIV - AJAX again. After a little modification, it was working well with the site, BUT the facebook comments weren't loading. Bah!

So I conceded defeat... for now... and went back to the non-AJAX, non-cool, independent newsfeed page. The facebook comments work now, and each article can be easily linked to (something the AJAX version would not allow). I will probably stick with this style though for other reasons - I'm not sure how complicated things will get with the AJAX version when I get down to allowing the viewer to search and sort through the newsfeed items.

The Roach's next step shall be to add some content. A lot of time and effort has been spent on getting the tech stuff going... but there isn't much here yet for people to see. Unless you leave some interesting comments of course... Go on, don't be shy...