views:

182

answers:

1

In my facebooker ruby rails app i can't seem to get a user session. It works outside the tab however.

class TabController < ApplicationController

ensure_authenticated_to_facebook ensure_application_is_installed_by_facebook_user

def index @user = session[:facebook_session].user end

Error is something like:

Filter chain halted as [:ensure_authenticated_to_facebook] rendered_or_redirected.

when i do "skip_before_filter :ensure_authenticated_to_facebook" i then get session/user is nil...

any ideas. They make this so hard to do.

Thanks

A: 

From the app tab wiki page:

It doesn't know who the viewing user is when the user first visits the tab. Facebook sends the fb_sig_user and fb_sig_profile_user parameters, both containing the profile owner's user ID.

It looks like at least the original request for an app tab page is unsigned, so don't expect your auth to work.

teepark