API Key Invalid

May 6, 2009 at 12:27 PM
I am just starting writing a Facebook IFrame Canvas App for the first time. I have copied the code basically from the User Manual but I am getting the exception:-
InvalidAPIKey. I don't know if this is because the code is wrong (because this is my first App) or if my API key needs activating or something. I set up a developer area this morning and created one application, then downloaded the API kit and wrote this. I set up the URL from facebook, and accessed my app from facebook. The result was the exception. If anyone can confirm that my code is right, or if not what I should have written, that would be great.

protected virtual void Page_Load(object sender, EventArgs e)
            base.ApiKey = "b23a44014a1011ac4d025849c41102b4";
            base.Secret = "XXXX";

            if (!Page.IsPostBack)
                    user u = this.API.users.getInfo();

Exception is thrown on the last line.

May 7, 2009 at 1:15 PM
I solved this. I needed to call base.Page_Load. Once that was done, worked perfectly.