It's always the simple stuff

Feb 13, 2009 at 9:14 PM
I've managed to get Hello World to work, although I haven't figured out the whole login/connect thing.

Inheriting my page from facebook.web.CanvasFBMLBasePage... In my Page_PreInit event I set base.RequreLogin = true. 

My page loads using this:

But not from within Facebook, I get page not found.  apps.Facebook.<MyAppName> doesn't work either.

However I am able to get at the API because this code works:


user CurrentUser = API.users.getInfo(API.uid);


UserImg.ImageUrl = CurrentUser.pic;

UserNameLbl.Text =

string.Format("Welcome {0} {1} ", CurrentUser.first_name, CurrentUser.last_name);


Obviously I am failing to do something easy here.  It is getting very tedious cutting and pasting this link into the browser over and over and over :-)

I am also having zero luck using FBML.  I have tried the following:

Putting <fb:dashboard></fb:dashboard> in the ASPX file.  I can see this in the page source, but there is no dashboard.
Creating a label, and setting it's text to the FBML as some examples on the web do.  Again, I can see FBML in the page source, but nothing is displayed.
Writing <db:dashboard></fb:dashboard> directly into the response stream.  No go.
If I put fb tabs inside my dashboard tags <fb:action, <fb:createbutton, etc. I see the literal text from these commands but the fb: tags are ignored.

Obviously I am being very stupid here, AGAIN, and this is ridiculously simple if you know what you are doing.

Or these two problems are related in some way.  Would appreciate any advice, once I learn something will help other noobs :-)

Feb 13, 2009 at 10:17 PM
I've created a VS.NET Starter Kit for FDT which illustrates a number of FB development features and may help. You can find it here:

Feb 13, 2009 at 10:33 PM

Thanks for the link -- loaded your starter app, learned a few things.  Your starter app is an IFrame app, would rather use FBML as IFrames are troublesome.

This can't be rocket science.  Just need to understand what code/behind I need to have this work from Facebook instead of with the app key url method (doesn't make for a very convincing demo), and how to get FBML to be processed as I don't see the need to recreate the dashboard, or the tab control, or make my own dialogs for standard functions when all of that is available using FBML.  The Facebook developer Wiki has seriously whet my appetite for FBML...


-- The Moose

Feb 14, 2009 at 4:23 AM
From one of Facebooks developers on the subject:

FB App Canvas Pages: I Think I’d Use IFrames

I'm not trying to open a debate on the subject rather just point out a good read.

Feb 16, 2009 at 2:17 PM
Your link taught me more about how the whole thing works than a week of Googleing has.  And here I thought IFrames had gone the way of classic ASP pages that resubmit to themselves on every postback, and that "modern" programmers did everything in div tags <grin>  Well, well well, what is old is always new again.  I wonder if JCL will make a comback.  And to think I threw away those APL books from college.

Seriously thanks a lot, if there are other links like this please share them.  My current client has built one facebook app using flash and a third party clearspring integrator, I can insure job security by learning this stuff.

Thanks Again

-- The Moose

Feb 16, 2009 at 4:09 PM
Sadly my application still doesn't look, act, or feel remotely like a Facebook app.

Your starter app and my starter app both have the same bug, they won't load through Facebook, and must be forced to load by pasting this link:

What I get from both doesn't look anything like a Facebook application, no dashboard, no skyscraper ads on the right.  Your app is much more sophisticated than mine, but as you used extension methods to get at the API I am unable to discover the methods using intellisense or the object browser -- which was nice using the CanvasFBML page as a base. 

Either way I cannot demonstrate anything to my manager that requires me to paste a key into the browser every time, and looks nothing like anything in Facebook.

Books I can buy?  More links I can read? 

Feb 17, 2009 at 3:41 AM
Edited Feb 17, 2009 at 3:47 AM
Hey Moose,
  Glad I could help out, your post made me laugh!

Have you tried<your_app_name>?  Also beware of trailing backslashes as in some cases they are required.

For example, my starter kit is

Also, be sure to look closely at the steps on my wiki to ensure your settings are the same.

Perhaps this (through my employer) might be an alternative:

Feb 17, 2009 at 1:02 PM
Hello Steve
I really appreciate the time you've taken to try and help me out.

The "login problem" seems to happen to quite a few people on this forum.  I'm going to try Facebook.NET, and search for documentation that gets into the internals.  Barring that, it will be the old fashioned tried and true reverse engineer the http: traffic to figure out what everybody else is doing!

The Moose
Feb 17, 2009 at 10:55 PM
You're welcome, good luck!