
So I attended the Facebook Garage – San Diego meeting on Thursday night and I was incredibly inspired by the panel there. I led a panel on Facebook Application Monetization, which I have written about on this blog before, and I learned a lot from some of the other developers and entrepreneurs present at the event. I will be writing about that shortly.
After the event on Thursday I was utterly inspired to get off my duff and complete my Facebook Application. My application is ridiculously simple and I have a monetization model for it, but for the most part I’m writing the application because it is something that I find amusing and I’d use and develop it even if no one else did.
Today I want to vent my frustration with the Facebook Developer’s Toolkit, the Microsoft-endorsed .NET Facebook development platform built by Clarity Consulting and why I’m switching to Nikhil Kothari’s Facebook.NET. I wrote about both the Facebook Developer’s Toolkit and Facebook.NET in a previous entry where I listed all of the available .NET SDK’s for Facebook application development.
The Needs of My Application
Before I get into how the Facebook Developer’s Toolkit failed to fulfill my needs, let me run down what my needs are in the first place:
- Communication with a SQL back-end – like 99% of applications out there, I need some place to store my data. Currently I have an AWESOME data layer built using the methods I described in one of my recent entries on how to design an awesome data layer in ASP.NET.
- Very small data footprint – To give you an idea of just how small the amount of data I need is, my SQL database consists of only two tables.
- Very simple interface – My interface consists of a single form accessible via the canvas page, and if I feel like trying the fake-AJAX stuff that Facebook is building in, maybe I’ll implement it on the profile page too.
- Sets FBML on the Profile – Yes, this application needs to be able to publish to the Facebook user’s profile page area.
- Publishes items to the News Feed
- Uses FBML instead of iFrames – I have a VERY simple interface and the amount of time it would take me to develop an iframe equivalent for some of the features that FBML offers made the choice for me; I need to use FBML.
Now I’m not doing anything spectacular in terms of the technological demands of my Facebook application, but the Facebook Developer’s Toolkit made it hard for me in the first place.
How Facebook Developer’s Toolkit made things Difficult
Before I begin, I need to tip my hat to AjaxNinja reader vjeran, who warned me in an email that the Facebook Developer’s Toolkit was full of bugs and not to use it. If only I had listened.
- It’s not clear what the CanvasFBML class actually does – One problem I ran into right away when I started testing on my live website was that I ran into a ton of incorrect signature errors on my post-application add page. There were no other additional details other than that. When I investigated into the issue on the discussion page for the Facebook Developer’s Toolkit, I came across the first piece of bad news, which is that the subclassed pages do not connect to Facebook automatically. Why in the hell am I giving the subclass members access to my API key and Secret key then? For fun? In short, I have no idea what the base class does, it’s not well documented, and if it doesn’t handle Facebook REST authentication under the hood, then there is no point in me having it. QED.
- There is no method-specific documentation – The title pretty much says it all. There just isn’t any documentation for most of the methods, even IntelliSense documentation. I had a little adventure figuring out how to set the user’s profile FBML using the Facebook Developer Toolkit, and even after I found what I think is the correct method (setFBML(string)), I’m still not sure if it works because I can’t get my FBML application to properly authorize with Facebook still.
- Basically, forget developing FBML apps with the Facebook Developer’s Toolkit – I developed a small iframe application a while ago over at the AjaxNinja labs, and it worked fine as an iframe app. However, developing a full-fledged FBML application is a nightmare that I wouldn’t wish upon my worst enemies. A lot of it is guess work, desperate Google searching for answers, and translating PHP examples into ASP.NET.
Why I’m switching to Facebook.NET
Facebook.NET has even less documentation than the Facebook Developer’s Toolkit. However, it does have a VERY good FBML example, which the Facebook Developer’s Toolkit does not have. I think the Facebook.NET platform is abstract enough that I could flexibly design my own FBML application intuitively, which I was unable to with the Facebook Developer’s Toolkit.
If I ever get this application finished (I was hoping to have it done already), I will be posting the full source code online and I will be documenting some of my own tips and tricks on how to do Facebook Application development properly in ASP.NET.
If you enjoyed this post, make sure you subscribe to my RSS feed!
Comments 19
Hi Aaron,
Great to hear you’re looking to Facebook.NET … I am certainly open to any and all feedback about bugs, ideas, suggestions etc. to make sure Facebook.NET continues to provide a solid base for building Facebook apps. I’ve set up the CodePlex project partly to create a nice channel for folks like you to participate in the discussion/issue forums.
Thanks, Nikhil
Posted 26 Aug 2007 at 10:16 am ¶Nikhil,
I’m very impressed with Facebook.NET so far; I redesigned my entire application using its FBML approach and I am proud to say that my application finally started working. The Facebook Developer’s Toolkit simply hid too many undocumented behaviors “under the hood” for it to be trusted, whereas your framework allows for very abstract and simple, yet elegant methods to approaching a Facebook application in .NET.
I am very happy with the tool and I will continue to use it. I will even be posting the full source code for my application once it’s finished so other Facebook.NET developers can have more resources to look at.
Thanks for making a great tool; I will be posting more about it in the future.
-Aaronontheweb
Posted 27 Aug 2007 at 2:36 am ¶While your post was very interesting and informative, I was distracted at the outset by your beginning the article with the conjunction “so”. Speakers, and now writers apparently, have been misusing this word in the past few years. It has become as common and as irritating as that other misused conjunction, “like”. But somehow it is now accepted and spread by otherwise educated people who would rail against the similar misuse of “like”.
“So I attended the Facebook Garage…” should be preceded by a related idea, as in, “My wife was out of town this weekend, so I attended…”. Of even more common use than this example, however, is the use of the misunderstood “so” to start the answer to a question. I frequently hear the following type of exchange at meetings:
Q: “How’s your project coming, Jane?”
A: “So I met with HR this morning…”
I anticipate the day when I ask a co-worker the time of day and am responded to with “So, I’m looking at my watch and the little hand is on the three…”
Posted 27 Aug 2007 at 10:54 am ¶Hey Dean,
Thanks for your comment. I’m perpetually interested in improving my writing form and style, thusI will add “look for the misuse of so” to my list of checks I perform each time I write an article. I posted an article today on Dumb Little Man about weight loss and lifestyle changes (I did not mention it on this blog because it’s not relevant to the subjects I write about), and I my grammar was also criticized there. If you have some feedback on how I can improve upon that article also I would love to listen to it.
Posted 27 Aug 2007 at 11:12 am ¶Hehe.. yeah dude! look at this now:
Posted 29 Aug 2007 at 2:54 pm ¶for example i have, in my app call that returns facebook user object, from some ID. 10 o’clock at night.. and i am in debug mode. My app starts to break everywhere… then i noticed that (in Immediate window) when i write object in direct way, while in break point, it returns null??? while 5 time, it returned correct data with same call?!? So, webservice timeout…and we have problems..
No i am wondering, maybe this facebook toolkit is missing it’s point – in architecture way – maybe something like jquery or YUI Ext would be much better for this issues.
Yeah I think the basic problem with the Facebook Developer Toolkit is the fact that it’s just too rigid. Facebook.NET is very flexible and I think this will ultimately prove to be a better approach to .NET-driven facebook applications given that the platform will likely be subject to changes down the road, especially the FBML syntax.
Posted 29 Aug 2007 at 3:29 pm ¶The only issue I have with Facebook.NET is that the application has to be either a FBML or Iframe application running within facebook. I can’t figure how to create a stand-alone app that just authenticates. The facebook toolkit seems to be designed for stand-alone apps first then integrated apps second.
I’d switch if Facebook.NET had a stand-alone option. I think I saw a comment that it’s in the works
Posted 30 Aug 2007 at 12:12 pm ¶Razman, not sure if you’ve looked at everything inside the Facebook.NET package – but if you do, you should see Facebook.Desktop.dll – it has the ability for client apps to show a login dialog to create a Facebook client session, and then you’re off and able to use all the APIs… or you can use an infinite session as well, if you have one and don’t want the user to login.
If you don’t see it, and have questions I’d recommend using the discussion forum on CodePlex rather than simply letting your questions/thoughts go unanswered/unaddressed.
Aaronontheweb, sorry for using your comments form for this, but I just thought I’d take the opportunity to point Razman to whats there.
Posted 30 Aug 2007 at 12:29 pm ¶It’s no problem Nikhil, that’s what blogs comments are for!
Posted 30 Aug 2007 at 12:41 pm ¶I have to say this has left me confused as to whether I need to downlaod the developers toolkit or not. I’ve done it, but there’s no instruction afaics as to where the source and binaries need to be extracted hence no Facebook related tools in my toolkit.
Posted 20 Oct 2007 at 12:10 pm ¶Hey Jef,
If you want to use Facebook.NET you do not need to download the Developer’s Toolkit. The Developer’s Toolkit is a separate interface for designing Facebook applications with ASP.NET. I’m afraid, however, that I do not entirely understand your post. No Facebook-related tools in your toolkit? What do you mean?
Posted 22 Oct 2007 at 7:54 am ¶Hi Aaron,
I meant having seen a video transcript elsewhere of a facebook app being created, the Asp.net toolkit list in VWD 2005 contained some controls under a Facebook heading in the list. So I took it that to appear in this list the binary files had to be unzipped to a particular location.
Anyway, as I don’t need the Toolkit I tried Facebooknet but find myself stuck. All seems set up correctly with my callback url set to my workstation 123.123.123.123:3179/facebooknet for example but it fails to connect every time. I switch off the firewall in case that causes the problem but no change.
I try it also on my server which I know is configured for asp.net 2.0 because I’m running Dotnetnuke on it, but the server response indicates an error, suggesting that the web.config settings are changed to create an error log file.
Jeff
Posted 22 Oct 2007 at 9:07 am ¶Hey Jeff,
Sorry it took me so long to get back to your comment! Are you trying to authenticate your requests through your web browser (i.e. are you connecting directly to 123.123.123.123:3179/facebooknet) or are you making the requests through the Facebook.com proxy (http://apps.facebook.com/APPNAME/)? Facebook.NET won’t authenticate you unless you direct your traffic through Facebook, simply because Facebook.NET needs access to the Facebook session data which is created at the proxy.
There is an option you can enable on the <fb:Application> control called “enableExternalBrowsing” you can set this to true then give that a try if you’d like.
Posted 22 Nov 2007 at 3:57 pm ¶HI Aaron,
I’d tried both. I’ll try that setting and have a fresh look at it tomorrow.
Thanks.
Posted 22 Nov 2007 at 4:04 pm ¶Let me know how it goes
If you want me to gloss over your code or if you want to email me, feel free to shoot me an email at
jiive[dot]aaron[at]gmail[dot]com
Thanks!
Posted 22 Nov 2007 at 4:22 pm ¶Aaron, This is how far I get without writing any code. Just using the facebooknet template which now seems unchanged with or without the enabalextarnalBrowsing property:
Server Error: 501 Not Implemented
Operating System Error Nr:6: errno = 0×6
No RPM for this combination of URL and method
/fbnet
Posted 27 Nov 2007 at 1:45 am ¶Did you supply the correct API key and SECRET in the Web.config file? It looks like you’re getting an authorization error from the Facebook REST servers.
Posted 27 Nov 2007 at 6:38 pm ¶Hi, I did but seem to have left some spaces in the key by copying and pasting. Also forgot to specify the channel in the callback url.
Now I’ve set this to localhost:3569/fbnet/welcome.htm and that’s the page I’m seeing.
If this is the starting point for my app, that’s fine. I was expecting to open a default.aspx file on a .net type application. Perhaps another error….
Jeff
Posted 28 Nov 2007 at 6:35 am ¶OK, then I remove the welcome.htm from the callback url and get this:
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
Posted 29 Nov 2007 at 1:46 pm ¶Trackbacks & Pingbacks 6
[...] word of thanks to Gary Gil of Podclass, Woody Pewitt of Microsoft (who gave a great presentation on Facebook.NET), Alex Shah of FaceDouble, Ryan Denny of BYU, David Levine of the Harvard Business School, Rodney [...]
[...] Silverlight 1.0 with C# – Photo Carousel (Part 1) – Nikhil Kothari, the same ASP.NET developer who brought us Facebook.NET, has a great Silverlight 1.0 code sample up. I haven’t had a chance to play around with [...]
[...] Why Im switching to Facebook.NET from the Facebook Developers Toolkit – I didn’t even know there were two ways to hook up .NET apps to Facebook. (via DotNetKicks) [...]
[...] article as a resource for my Facebook application development (Master Pages are VERY helpful for Facebook.NET applications.) What I like about it is the section towards the end where it covers how to access [...]
[...] It’s about time for an update on Facebook Application with ASP.NET, using Nikhil Kothari’s Facebook API wrapper for ASP.NET, Facebook.NET. If you want to read about why I’m using Facebook.NET instead of the Facebook Control Toolkit then click here. [...]
[...] Of course, it started working perfectly. I have posted a bug to the tracker and decided to look at the Facebook.NET, a better and much cleaner implementation according to AjaxNinja. [...]
Post a Comment