I'm using a before_filter to detect the signed_request
query string Facebook generates when a user is referred to a canvas app.
Then, I set session[:canvas] = true
and test for that when I need different app logic based on whether the user is in the canvas or on the native browser app. The problem is that if the user, for any reason, leaves the canvas and navigates to the browser-based app, the session[:canvas]
variable is still set to true.
Is there a better way to detect the difference between the canvas and the native browser app?