redirect loop

Jun 7, 2008 at 2:55 AM
hello again

I am having a problem with an infinite redirect loop and I've set EnableExternalBrowsing=false. I have searched quite a bit for the source of this problem but can't seem to find it.
Jun 10, 2008 at 8:42 PM
There's really not enough in your description to convey what's happening. Is it a FormsAuthentication problem? I've seen infinite redirects on those. Are new query string parameters getting tacked on to the URL? I've seen that happen. Is it an error handler on your app that is causing an error itself in some situation? There's a wide range of possible scenarios that could be at play here. I'd recommend either HttpWatch or Fiddler for IE or either LiveHTTPHeaders or Firebug for Firefox to start delving into what's actually being passed between browser and server.

Bill
Jun 22, 2008 at 3:31 AM
I'm having the same problem.  Whether I use the examples in the handbook to set up my Page_Load event and get my auth keys, or use the FaceBookApplication object, I just keep getting this error:

The page isn't redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

    *   This problem can sometimes be caused by disabling or refusing to accept
          cookies.

I've tried using the "5 minute" IFrame canvas (which does nothing because the Page_load event never gets called) and the Web Development examples from the "FaceBookDeveloperToolkit.doc" that comes with the libraries, and I either get no results or the same.

I've made examples in both C# and vb.  I get the same error.

I'm missing something here.  I'll be damned if I know what it is.  I've spent 2 hours on Google looking for the answer.


Jun 22, 2008 at 4:12 PM
Edited Jun 22, 2008 at 4:14 PM


cellis3306 wrote:
hello again

I am having a problem with an infinite redirect loop and I've set EnableExternalBrowsing=false. I have searched quite a bit for the source of this problem but can't seem to find it.


This is the solution I ended up with after messing about with the properties and mixing up the examples to find something that actually works:

   Protected Shadows Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
      Dim fbService As Facebook.Components.FacebookService
      Dim authToken As String

      authToken = Request.QueryString("auth_token")

      If authToken = "" Then

         Response.Redirect("http://www.Facebook.com/login.php?api_key=" & FACEBOOK_API_KEY & "&v=1.0")

      Else

         fbService = New Facebook.Components.FacebookService()
         fbService.ApplicationKey = FACEBOOK_API_KEY
         fbService.Secret = FACEBOOK_SECRET
         fbService.CreateSession(authToken)

         Session("Facebook_session_key") = fbService.SessionKey
         Session("Facebook_userid") = fbService.UserId
         Session("Facebook_session_expires") = fbService.SessionExpires

         helloLabel.Text = fbService.GetLoggedInUser

      End If

   End Sub

I still need to check for PostBacks, etc.  But, this basically solved my problem with developing in VWD 2008.