Tuesday, December 16, 2008

Experimenting with facebook connect and Dotnetnuke

I've been spending a little time trying to get Facebook connect integrated with a DotNetNuke portal.

On the technical side, I've been using the Facebook Toolkit from Codeplex and this link on stackoverflow was very useful for working out the cookie confusion: http://stackoverflow.com/questions/323019/facebook-connect-and-aspnet

Currently, it's all gone quite smoothly :)

The only problems I've had:
  • My skin didn't initially specify XHTML - so I had to add a .doctype file to my skins directory - if your skin is called AAA.ascx then you need to add AAA:


    [skindoctype]
    [![CDATA[ [!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"] ]] ]
    [/skindoctype]


  • In order to add the xmlns for fb I did have to change the default.aspx code from DNN - it's not a big change, but it's still a bit sad I have to change the core :(

  • I messed up the ordering of the facebook elements at one point.... for clarification, make sure that FB.init("API_KEY_HERE", "/dnn/connect/xd_receiver.htm"); is the last thing seen on your web page - not the first!

  • I've been fighting with the lack of documentation - facebook seem to be relying on us dissecting their runaround example app...

  • I've hit some problems with API calls resulting in "Session key expired or no longer valid" - but these are basically due to the user logging out of facebook - easy to workaround.

  • Similarly when the user has logged out of facebook I've hit some problems with facebook's automatic buttons (e.g. with fb:login) - but again these are easy to workaround - you just use your own facebook links instead of the automatic buttons.
Anyways.... now I've got the first stage working, it's time to really start exploiting the integration.... be back later....

1 comment:

  1. How did you get on? I've just started experimenting with this.

    ReplyDelete