Published: Tuesday, April 07, 2009 in articles » technology by Thomas Baekdal
Baekdal.com now features a completely redesigned commenting system that tabs into the power of social networks. Instead of manually typing in your name, you simply press a button. How amazing is that...
Anyway, Baekdal.com now allows you to connect your comment with Facebook. You can pull your public profile data into Baekdal.com, and also post feeds back to your wall, letting people know that you are currently discussing a topic.
All you do is to click the Facebook connect button, authorize that baekdal.com may pull your profile data, and the rest is then done 100% automatic.
Then when you submit a comment, an inline dialog will appear, asking if you want to add this to your wall. And the next time, you don't even have to press anything, because Baekdal.com remembers your preferences.
On top of this, your comment will appear with your name, your picture and a link to your Facebook profile.
But wait... There is more...
Facebook connect is pretty cool, but I personal favors Twitter. This means that you also can connect via Twitter, and via Flickr. Pulling the public profile information from both networks. Each services pulls different information (and you can connect with as many as you like).
The new system also supports Gravatars. This is a system that links your email address to a profile picture. So, if you want to use your Gravatars, you can simply add your email, and it will figure out the rest.
And finally, the commenting system is now 100% AJAX based (or rather SJAX based).
Making this was both fairly simple, and hugely complicated. In these developer notes I am going to talk about the good and bad things about each part of the system (warning: this is going to be a bit technical).
There has been a lot of talk about Facebook Connect, and it is a pretty impressive system. It very quickly allows anyone to tab into Facebook using a very simple system. There are two videos that you need to see:
It basically only takes 15 minutes to incorporate Facebook Connect into your site, and apart from Opera (and occasionally Firefox), it works great.
But there is a catch. Facebook Connect is not an API. It is a closed specialized system that you have to integrate into your site. What is the difference you ask? Well, a lot actually.
An API is a system that allows you to work with the data of another site. It allows you to request and submit the data itself, usually formatted as XML. This is great because that means you have full control over the experience, and how people interact.
Facebook does not allow you to work with the data. It enables you to add Facebook specific elements to your site, but it is then Facebook that requests and submits data. The good thing about this is that it is very easy to implement. The bad thing is that you, as a developer, have very little control over the experience - and over what goes on in your own site.
As a developer I much prefer the to work with an API, than a closed system.
Note: You can get around some of these things using server-side elements... But it is tricky.
I did however cheat a bit. Instead of using the Facebook element, I extracted the result from those elements, and use that. Facebook wants you to use e.g. fb:name as ‘your name' but that is not very usable, when you also wants to use other networks. So instead I allow Facebook to render the fb:name tag in a hidden DIV, and then I extract the real name (e.g. Thomas Baekdal) and put that into the name field of the form.
Not exactly the the Facebook way of doing things.
The Twitter API is, however, much better. While it is less user-friendly, it is far more powerful and controllable. You simply request the data you need, and Twitter sends back the code in a nicely open format. You don't have to incorporate special Twitter code, nor adjust your interaction with their system.
There is, however, one major flaw with Twitter, and that is security.
While both Facebook and Flickr employ highly secure authentication systems, Twitter is the most insecure system you can possible think of.
One example. In order to update the status of a person, e.g. to allow them to tweet that they have been reading and commenting on an article, you have to send the following command:
curl -u username:password -d status="your message here" http://twitter.com/statuses/update.json
The problem is the username:password part. Because in order for baekdal.com to update your status, when you post a comment, you have to give me your username and password.
Let me repeat that. YOU have to give SOMEONE ELSE your username and password.
That is of course completely ridicules way to handle user authentication in an API. Both Facebook and Flickr handles user authentication in ways so that external sites never gain access to people's login data. Instead they control what permission each API-app get directly - completely securing people's profiles.
Twitter doesn't, and that is really bad.
I am aware that Twitter is starting to authenticate using OAuth. This is great news, and will, with time, solve the security concerns I might have. For now, not even OAuth is secure enough, since it is either no access, or full access. I want to be able to update the status, but not change e.g. people's names and profile information.
Note: Be careful about this when you are asked to sign into Twitter on other sites. You are actually giving away your username and password to a third party. And once they have that, they can do everything.
As a result I decided not to implement ‘update my Twitter status', because I do not want to know your username and password. Nor do you want to tell me. Baekdal.com will ONLY request your public profile data, based on your Twitter id. It cannot request any other data.
Flickr is different. Because while it is much more technical than both Twitter or Facebook, it is highly secure. You can of course request public data (like what I am doing on Baekdal.com), but you can also request data on 3 other levels. Read, read+write, or read+write+delete.
So people can authorize how much access they want to give to external sites for each application. That is pretty cool.
On Baekdal.com I am only requesting your public profile data, which includes your name, profile picture and URL to your photo page, and as such you are not required to authorize access.
And finally Gravatars. A few of my readers have requested support for Gravatars, so I decided to add it as a bonus. It is a pretty straightforward system.
Users can sign-up at Gravatars, with their email address, and upload an image. Then external sites can request that image by requesting a special URL:
http://www.gravatar.com/avatar/[MD5 hash of email address].jpg
E.g. http://www.gravatar.com/avatar/3b3be63a4c2a439b013787725dfce802.jpg
Baekdal.com simply adds this image if you enter your email address when submitting a comment.
So there you have it :)


Lead Experience Planning Practice at Razorfish. Pragmatic futurist; design strategist; publisher of http://feed.razorfish.com; coffee drinker; dad.
follow me on Twitter, or visit my website
This is spot on. Definitely one of the best implementations of FB Connect and Twitter that I've seen. I think this will be transformative for publishers as blog commenting activity (where most of the real action lives) can now be integrated into the social sphere. Very cool.

Writer, Project Manager and Interaction Designer
follow me on Facebook, Twitter, Flickr, or visit my website
Hi Garrick,
Thanks - really appreciate it! :o)
BTW: I fixed a small bug with your first comment (and merged the two). It couldn't handle a stray enter character in the image link.
Nice Thomas, finally gravatar support. Awesome!
I think this makes things a little complicated for me, but that's okay, since everyone else seems to love it.

Writer, Project Manager and Interaction Designer
follow me on Facebook, Twitter, Flickr, or visit my website
Aku, Why? If you don't want to use the social network connections, then it works just like it always has.
This is fabulous, Thomas! And thank you for the developer notes...very helpful.
One thing: this form should probably read "Or identify ..." rather than "Our identify ..."

Writer, Project Manager and Interaction Designer
follow me on Facebook, Twitter, Flickr, or visit my website
Thanks Ty,
Oh.. and yes it should be 'or' and not 'our' :)
This is fabulous, Thomas! And thank you for the developer notes...very helpful.
One thing: this form should probably read "Or identify ..." rather than "Our identify ..."

Interactivity, Design, Art, Technology, Life and Everything Else in Between
follow me on Twitter, or visit my website
couldn't help to try it. well done, congrats.

Writer, Project Manager and Interaction Designer
follow me on Facebook, Twitter, Flickr, or visit my website
Thanks :)

I like UI, design, business, Apple (usually), PHP, Rails, jQuery, typography, and freedom. Sometimes I’m funny.
follow me on Twitter, or visit my website
Pity about Facebook not working with Opera. I find it rather obnoxious they can decide for every possible website that may use Facebook connect that, really, they don't have enough Opera users. While the percent is small, it's real, and in some circles (web geeks, Europe) we Opera users reach double-digits.

I like UI, design, business, Apple (usually), PHP, Rails, jQuery, typography, and freedom. Sometimes I’m funny.
follow me on Twitter, or visit my website
Okay.. oddly enough there was no Facebook connect button when making the above post, but when I actually made it, a modal asked me whether I'd like to publish this comment to my news feed. (I am in Opera at the moment.)

Writer, Project Manager and Interaction Designer
follow me on Facebook, Twitter, Flickr, or visit my website
Alan, I agree.
But, I was surprised that the Facebook 'post to wall' featured appeared at all. I have to look into that.
It's very little, but I'm so minimalist that those three extra buttons are something...

concept design student, passionate about photography, curious, loves fashion, power to the people, mac/apple addict & music makes my day
follow me on Twitter, or visit my website
ah now i get it (:
pretty pretty nice idea.
love it and will make me more active here.
Adventurer, Cyclist, Writer, Photographer, Climber, documenting our planet, words & vision. Currently cycling from Alaska – Argentina: http://WorldOnaBike.
follow me on Twitter, Flickr, or visit my website
Pretty cool, any chance of releasing this as a Wordpress plugin?
Now the next step must be to write a program that changes the copyright year in your footer ;-)

Adib is an ideas person and a lover of all things aesthetically pleasing. He is also a deadly multidisciplinary designer.
follow me on Twitter, or visit my website
first time that i've visited your site and I must say that the facebook connect twitter flickr integration is AMAZING. Love it to the max!
As Harry mentioned, a wordpress plugin would be awesome. Or, a tutorial to implement it would be great too:)

Writer, Project Manager and Interaction Designer
follow me on Facebook, Twitter, Flickr, or visit my website
Thanks guys!
Although, I am not going to make a Wordpress plugin. I don't use Wordpress, nor know really much about it. Sorry! :)

Internet Proponent and Entrepreneur in heart (Vietnam)
follow me on Facebook, Twitter, or visit my website
Best social comment system that I've seen
This is surely the coolest website trick I've seen in a long time!



Baekdal.com is (nearly) everywhere. Check out our social profiles:
Apr 7
2009
Thomas Baekdal
Writer, Project Manager and Interaction Designer
follow me on Facebook, Twitter, Flickr, or visit my website
This is just an example of a real comment. Where I have connected with Facebook Twitter and Flickr simultaneously. The picture is from my Facebook account, the description is from Twitter, so is the link to my website.