setfbml Incorrect signature

Aug 26, 2008 at 9:15 AM
Edited Aug 26, 2008 at 9:30 AM
Hey

ï'm trying to get the setfbml to work, but get en error "Incorrect signature"...
Wonder if anyone have som suggestions, been trying to browse the forums but havnt found the answer yet.

Exception Details: facebook.Utility.FacebookException: Incorrect signature

here's the code:

public partial class Facebook_Entry : System.Web.UI.Page
{
    private const string API_Key = "0d1473c28863d1ea6956ca2edd2bdcfe";
    private const string SECRET_Key = "c880a6b748b2bc6a87817aa6759e356f8";
    private facebook.API MyAPI = new facebook.API();

    protected void Page_Load(object sender, EventArgs e)
    {
        MyAPI.IsDesktopApplication = false;
        MyAPI.Secret = SECRET_Key;
        MyAPI.ApplicationKey = API_Key;
      
        // fb_sig_session_key=d075f17bef516de770574a31-568992269

        if (!String.IsNullOrEmpty(Request.QueryString["auth_token"]))
        {
            MyAPI.AuthToken = Request.QueryString["auth_token"].ToString();
            MyAPI.CreateSession(Request.QueryString["auth_token"]);
        }
        else if (!String.IsNullOrEmpty(Request.QueryString["fb_sig_session_key"]))
        {
            MyAPI.SessionKey = Request.QueryString["fb_sig_session_key"];
            MyAPI.uid = Convert.ToInt64(Request.QueryString["fb_sig_user"]);
        }
        else
        {
            string redirect = "<script language=\"javascript\">parent.location.href='http://www.facebook.com/login.php?api_key=" + MyAPI.ApplicationKey + @"&v=1.0&canvas';</script>";
            Response.Write(redirect);
            Response.End();
        }

        //Response.Write(MyAPI.uid.ToString());
        MyAPI.profile.setFBML(MyAPI.uid, "Fbml Test",  "", "");
    }
}

Aug 26, 2008 at 2:32 PM
ok so i tried to delete the app from facebook and create it again, and now the code works... :)