AutoPostBack and Facebook.NET

Nov 1, 2007 at 2:31 PM
Hi,

I'm not too hot at .NET yet but I'm learning - I've developed a simple page listing news for Facebook via the Facebook.NET library.

I developed the page on my localhost and I'm now ready to try it out on a hosted server.

The page itself loads fine but I find that if I use AutoPostBack set to true the URL gets injected with Facebook code.

For example, "default.aspx" turns into "/default~fbsigin_iframe... .aspx"

I'm not too sure what I've done wrong and I cannot find anything helpful when searching for possible solutions - has anyone else experienced this and if so do they know what I've done wrong?!

Many thanks in advance, Ben.
Nov 2, 2007 at 2:10 PM
Any pointers would be appreciated, many thanks in advance...
Nov 7, 2007 at 11:06 AM
I have also tried the following simple code and it still passes the session variables into the page URL between the page name and file extension;

protected void Button1_Click(object sender, EventArgs e)
{
FacebookApplication.Redirect("default.aspx");
}

So instead of redirect to "default.aspx" it actually redirects to "default~fbsiginiframe~1~fbsigtime~1194432179.413~fbsigadded~1~fbsiguser~501754749~fbsigprofileupdatetime~1194294689~fbsigsessionkey~f663a90953a24a9acd447ee1-501754749~fbsigexpires~0~fbsigapikey~3458f8358a72fdd637c35d6864b869b0~fbsig~0d6cbe470dbd0bb2564b49769a2dac03.aspx".

I'm sure its got to be something simple that I'm just not doing but from looking at the available samples but I still cannot see where it's going wrong.

If I create a new project without the Facebook.NET references and use the same code the AutoPostBack and Redirects works fine.

Has nobody else experienced this problem?

Many thanks in advance, Ben
Jan 4, 2008 at 9:02 AM
Hi i am facing the same problem but couldn't find a solution yet :( The same problem occurs when i try to use <fb-editor-button /> This means that it is not specific to asp.net but also exists for fbml. Any idea ?



BenVic wrote:
Hi,

I'm not too hot at .NET yet but I'm learning - I've developed a simple page listing news for Facebook via the Facebook.NET library.

I developed the page on my localhost and I'm now ready to try it out on a hosted server.

The page itself loads fine but I find that if I use AutoPostBack set to true the URL gets injected with Facebook code.

For example, "default.aspx" turns into "/default~fbsigin_iframe... .aspx"

I'm not too sure what I've done wrong and I cannot find anything helpful when searching for possible solutions - has anyone else experienced this and if so do they know what I've done wrong?!

Many thanks in advance, Ben.

Jan 4, 2008 at 3:01 PM
I solved problem for fbml by removing <form> tag from the page but when i remove <form> tag this time asp:button doesn't work. If you try using fbml tags you may solve the problem i guess