After much deliberation, I have decided to give Facebook Connect a shot on Snipe.Net. Those of you who read this site regularly may remember that I had quite a lot to say about using Facebook Connect last month, so it may seem odd that I’m making this decision. I’ll explain.

But… but you said….

It appears a few of my concerns from my previous article were addressed – at least in part. Unlike a month ago, it seems that Facebook has improved their security, so that if someone has their privacy locked down tightly, their name no longer appears on the site. When I tested with my own Facebook login, my picture was the default Facebook user icon and my name was listed as Facebook User. This is a big improvement in my eyes.

My main argument against using Facebook Connect on a site is using it as the only way to login, giving your users the choice of Facebook Connect, or not commenting. On Snipe.Net, we do not require a login of any kind, so this is less of an issue. If a user doesn’t want to use Facebook Connect but wants to comment, they are still free to do so. They can opt to use Facebook Connect if they want comment noted in their Facebook newsfeed. If they don’t, that’s fine too.

Goals

I am a firm believer in having specific goals for implementing new technology – not simply using it because it exists *cough*ajax*cough*. My goals here are simple – to encourage more Facebook users to visit the site. Generally speaking, regular readers of Snipe.Net tend to be of the somewhat geeky persuasion, with the exception of the random person who found the site by way of Google because they were having a specific problem that we’ve addressed here. Geeky people tend to have other geeky people as their friends – so this is an opportunity to share the joy and light that is Snipe.Net with more geeks.

It could be argued that most “real” geeks wouldn’t be caught dead on Facebook – but if that’s the case, no harm no foul. Nothing has been comprimised by adding it, even if nothing has been gained.

Making it happen

Making a website using Facebook Connect from scratch requires a little programming know-how. Making a WordPress blog Facebook Connect-enabled doesn’t, since there is a handy little plugin for it already. It appears the plugin is actually Facebook sanctioned, as the WordPress plugin documentation is available right from the Facebook developers wiki.

All you have to do is insert:

< ? php do_action('fbc_display_login_button')  ?>

into your comments.php file. Couldn’t be easier.

As a simple example, the comments.php snippet would look something like this, noting that the new line of code appears outside the else/if loop that checks if the user is logged in:

&lt;? php if ( $user_ID ) : ?&gt;
...
&lt;? php else : ?&gt;
....
&lt;? php endif; ?&gt;
< ? php do_action('fbc_display_login_button')  ?> 

The installation was a breeze – and although I’m still testing things out, all I had to do was add a line of code to the comments file in my WordPress theme. I opted to be a little more creative with it, and stack the “normal” WordPress comment form next to the Facebook Connect prompt, so as not to make the comment form area any longer or more unwieldy than it already is.

D’oh! Something’s borked!

One gotcha – and I don’t know if this is a bug on my end, or a plugin conflict, or what yet – but after activating the Facebook Connect plugin, my edit post functionality in the admin seems to be borked. When I try to edit a specific post, the page stops loading after the:

<div id="quicktags">
<script type="text/javascript">
<!--
edToolbar()
// -->
</script>
</div>

Still looking into this issue, and once I figure out what the cause is, I’ll update this post. As it stands now,  I have to deactivate the plugin in order to edit posts, and then re-activate it. A pain in the ass, and if I don’t find a solution soon, my Facebook Connect experiment is going to go away real quick. I’ll start by disabling some of my admin plugins and see if that helps. More to come.

Update: I disabled the Fluency Admin plugin and everything seems to be working fine. Pity, I like that admin skin. But the improved admin in WordPress 2.7 is certainly usable enough. Problem solved.

ssd-virtual-servers-banner-468x60

Advertisement

Themeforest
picture-61
Previous post

Learn New Languages Online For Free with LiveMocha

Ad by SocialCash
Next post

Advertising on Facebook - Part One

snipe

snipe

I’m a tech geek/dev/infosec-nerd/scuba diver/blacksmith/sword-fighter/crime fighter/ENTP/warcrafter/activist. I'm the CTO at Mass Mosaic and the CEO of Grokability, Inc. in San Diego, CA. Tweet at me @snipeyhead or read more...

  • Facebook User

    you did it! I still got some problems tho 😐

  • you did it! I still got some problems tho 😐

  • What kind of problems?

  • What kind of problems?

  • Oddly, every time I click the “Connect” button, the page comes up with me logged on but then immediately refreshes and I’m anonymous again.

    Might have something to do with cookie handling. If Facebook Connect requires saving any cookies that aren’t on *.facebook.com, I don’t save them persistently (Firefox clears cookies on exit except for a whitelist I’ve created).

    However, it doesn’t clear cookies mid-session, so I would have thought that whatever cookies I needed for Facebook Connect would have been established and stored long enough for me to post a comment…

  • Oddly, every time I click the “Connect” button, the page comes up with me logged on but then immediately refreshes and I’m anonymous again.

    Might have something to do with cookie handling. If Facebook Connect requires saving any cookies that aren’t on *.facebook.com, I don’t save them persistently (Firefox clears cookies on exit except for a whitelist I’ve created).

    However, it doesn’t clear cookies mid-session, so I would have thought that whatever cookies I needed for Facebook Connect would have been established and stored long enough for me to post a comment…

  • Aha… I stay logged in when at http://www.snipe.net/2009/01/trying-out-facebook-connect/, but when I get redirected to the “sub-directory” /comment-page-1/ I’m no longer Connected.

    In any case, in general I prefer not to post comments with my actual name, so I don’t think I’ll be using Connect very much.

  • Aha… I stay logged in when at http://www.snipe.net/2009/01/trying-out-facebook-connect/, but when I get redirected to the “sub-directory” /comment-page-1/ I’m no longer Connected.

    In any case, in general I prefer not to post comments with my actual name, so I don’t think I’ll be using Connect very much.

  • Interesting – I’ve noticed some transient issues with FB connect, but there are so many transient issues with Facebook in general, it doesn’t surprise me much (and perhaps I’ve gotten used to it?)

    Its also annoying that one can’t logout of FB connect on a site without logging out of Facebook entirely – although I imagine that’s less of an issue for people who don’t have to login as an admin.

  • Interesting – I’ve noticed some transient issues with FB connect, but there are so many transient issues with Facebook in general, it doesn’t surprise me much (and perhaps I’ve gotten used to it?)

    Its also annoying that one can’t logout of FB connect on a site without logging out of Facebook entirely – although I imagine that’s less of an issue for people who don’t have to login as an admin.

  • Aha – that *is* interesting – but still strange, since the cookie shouldn’t care that you’re in a subdir. Thanks for taking the time to troubleshoot – I don’t know that I’ll figure out why its doing that (cold just as easily be a FB issue and not a site-specific FB connect issue) but more info always helps.

    I feel ya on the not posting under your name thing – I rarely use FB connect on other sites when given the option – but I know lots of people like it, so I figured I’d give it a go.

  • Aha – that *is* interesting – but still strange, since the cookie shouldn’t care that you’re in a subdir. Thanks for taking the time to troubleshoot – I don’t know that I’ll figure out why its doing that (cold just as easily be a FB issue and not a site-specific FB connect issue) but more info always helps.

    I feel ya on the not posting under your name thing – I rarely use FB connect on other sites when given the option – but I know lots of people like it, so I figured I’d give it a go.

  • Wow – I am so unworthy to even post here! I’m going to cry…

  • Wow – I am so unworthy to even post here! I’m going to cry…

  • Hrm. It didn’t trigger a newsfeed item for Lars. Didn’t even prompt him. Not sure if something is broken, or if its just Facebook being buggy as usual.

  • Hrm. It didn’t trigger a newsfeed item for Lars. Didn’t even prompt him. Not sure if something is broken, or if its just Facebook being buggy as usual.

  • Facebook User

    hello..I’m basibanget from twitter. some of the name is not displaying right (Facebook User). u know hot to fix it?

  • hello..I’m basibanget from twitter. some of the name is not displaying right (Facebook User). u know hot to fix it?

  • Facebook User

    hmm..I think it’s my privacy settings

  • hmm..I think it’s my privacy settings

  • It will depend on your preferences normally. If your facebook profile is locked down fairly tightly, your name will not show up, since you don’t allow non-friends to see your info. If your profile is open, the name should show up normally.

  • LOL yep – see my previous post 😀

  • It will depend on your preferences normally. If your facebook profile is locked down fairly tightly, your name will not show up, since you don’t allow non-friends to see your info. If your profile is open, the name should show up normally.

  • LOL yep – see my previous post 😀

  • CJ

    I’ve been trying to figure something like this out for some time…love your blog design by the way

    CJ’s last blog post..Free Music Giveaway – The Fray

  • CJ

    I’ve been trying to figure something like this out for some time…love your blog design by the way

    CJ’s last blog post..Free Music Giveaway – The Fray

  • Your fb connect seems to work fine. On my site you cannot logout. Oh well. Some kind of conflict. Others have the same problem on other sites.
    .-= John´s last blog ..Public Option Resolution =-.

  • Your fb connect seems to work fine. On my site you cannot logout. Oh well. Some kind of conflict. Others have the same problem on other sites.
    .-= John´s last blog ..Public Option Resolution =-.

  • I would really like to have your code snippet for your sidebar (ie.how you made the login button centred and transparent) will you share it ?

  • I would really like to have your code snippet for your sidebar (ie.how you made the login button centred and transparent) will you share it ?

  • Facebook User

    Great!

  • Great!

  • Great Plugin!

  • Great Plugin!

  • Thanks for the insight.