unable to get preference

Jul 13, 2010 at 6:23 PM

I am struggling to get the Smiley.NET - FBML ASP.NET Sample running. 

Currently I get the message: unable to get preference, when this.Master.Api.Data.GetUserPreference(1) is called.  Here is the code - any ideas as to why this will not work?

	if (Master.RequiredPermissions != null && Master.RequiredPermissions.Count > 0)
                {
                    l.Text = "I need some permissions:";
                    var aa = this.Master.Api.Session.CheckPermissions();
                    l.Text += aa;
                }
                else
                {
                    l.Text = "I need no permissions:";
                }
                // You need to set info or profile box in order for the buttons on the page to show up.
                // Don't set them every time.
                var pref = this.Master.Api.Data.GetUserPreference(1);
                if (pref != "set")
                {
                    this.Master.Api.Profile.SetInfo("My Smiles", 5, getSampleInfo(), this.Master.Api.Session.UserId);
                    this.Master.Api.Profile.SetFBML(this.Master.Api.Session.UserId, null, getUserProfileBox(), null);
                    this.Master.Api.Data.SetUserPreference(1, "set");
                }