Categories
Events photography Software Videography Walking

On & Off The Avenue

Pictures From BarCampNYC7 and the streets of NY last week.

Also, a couple videos from BarCamp NYC 7:

Python Bots

And node.js overview:

barcamp NYC 7: node.js and asynchronous programming
Categories
Software

To connect or not to connect, That is the question

I wanted to integrate facebook Connect with my blog to make it easier for peeps to comment, post, share,..etc posts on this blog with their facebook accounts. A quick search revealed dozens of plugins to achieve the goal and I settled on Simple Facebook Connect plugin. I downloaded the files to my blog plugins directory & tweaked the configuration as described in the readme file & kept my fingers crossed.

Loading a post page, I could not see the notorious facebook login button as expected even though the FBML tags were showing in the source code for the page in question.

However, when I went to the admin login interface, the connect button was there & was working like a charm. It was only the blog pages that were missing the button.

Frustrated, I downloaded other plugins but the same phenomenon was consistent. No buttons were showing on the blog!

I was not sure at the moment where the problem was, whether it was my Pixeled(customized it with my style) theme or it was a plugin compatibility issue so I went to facebook connect and delved into their video tutorials to connect your website through their API. I discovered that you need FB.init() function call when you render the page so that you could get your fbml tags understood and rendered correctly. A look at the source code of various pages revealed that this JS call was missing. Not from the Login page though!

When I manually added the call to FB.init() with my facebook application API key to the footer of the site, the button(s) showed and things seemed to work in someway but of course, it had problems with posting comments and being compatible with Simple facebook Connect code. So I started trying to comment out lines here and there, used the facebook connect code to create my own connect button but did not want to write my own code from scratch. When I switched my theme back to the default WP theme, the plugin worked like a charm so I knew it was one of files that was missing something essential. A quick google search revealed that if you miss a line from your footer file, the button may not show up. That line was a call to the function wp_footer().

Aha, and this line may have been erased when I customized my Pixeled theme!

Blimey, be careful when you customize your blog theme, you may cause some unforseen issues down the road!