Response.redirect causing an error

Jun 28, 2007 at 12:04 PM
Hello, how are you?

I have followed the microsoft quickstart tutorial but have tailored it slightly to suit my needs...

I have an issue with the redirect if a user is not logged in... it causes a "HTML Tag not supported" error... However, if i take that response.redirect out it causes my page to fail because i cant get a facebook userid...

Any thoughts... or am i diagnosing the problem incorrectly?

Cheers

Gareth
Coordinator
Jun 28, 2007 at 10:30 PM
You are probably trying to follow the quickstart but within a canvas. If so, the authentication logic needs to be different.

I posted a discussion about some canvas samples and base pages I posted the other day. I plan to update the doc to include some quickstarts around the canvas apps.

See CanvasIFrameBasePage or CanvasFBMLBasePage. I am still working out a couple issues with these pages, but overall the should handle or show how to do authentication within a canvas.
Jul 2, 2007 at 4:29 PM
Edited Jul 2, 2007 at 4:45 PM
Strike my question below - I guess we have to redirect as follows:

If Request("fbsigadded") <> 1 Then
Response.Write("<fb:redirect url=""http://www.facebook.com/login.php?api_key=<api key>&next=&v=1.0"" />")
End If

Any luck on this? I'm not following the quick start personally; rather I'm just checking the value of fbsigadded, and redirecting if the user has not added my application:

If Request.Form("fbsigadded") <> 1 Then
Response.Redirect("http://www.facebook.com/login.php?api_key=<my api key>&next=&v=1.0")
End If

I'm getting the same error as he noted above. I'm not using iFrames.

Please advise
Coordinator
Jul 2, 2007 at 7:38 PM
Are you using the canvas base pages?

Jul 2, 2007 at 8:12 PM

rpowers119 wrote:
Are you using the canvas base pages?




Yes - I found out you can't just use Response.Redirect if you are using FBML (versus iFrames) - you have to use the fb:redirect tag.
Coordinator
Jul 2, 2007 at 10:02 PM
Cool. So, do you still have an issue? Or are you solved?
Jul 2, 2007 at 10:15 PM

rpowers119 wrote:
Cool. So, do you still have an issue? Or are you solved?

Good to go - thanks for the follow-up.