views:

8

answers:

1

I'm moving my client's facebook application over to an iframe, as suggested by facebook. Except, I seem to be losing facebook's provided "context" (userid, etc) when I perform an internal redirect.

Am I missing something trivial here? Pulling my hair out over here and googling isn't helping. I'm really hoping I don't have to use js to redirect the top constantly (like I did for installs..)

Thanks

+1  A: 

The users userId and other parameters are available from the request parameters as "session." It is urlencoded JSON. If you are using php then do:

$session = json_decode(urldecode($_GET['session']));

This also provides the tokens used for graph requests.

If this is not what you require let me know.

Gazler
I'm not a php developer but I'm also not seeing session in the request. Nor is "signed_request", which I've been using to validate, after an internal redirect. Do I need to pass it around in my iframe based app?
Chance
Gazler
Right, but I'm performing an internal redirect (server side redirect on my app). In doing so, I'm dropping that. Are people storing this in their session so that they can perform redirects/normal app workflow or are they redirecting the parent via js?
Chance
Store it in a session before you redirect, or pass it through in your redirect URL.
Gazler
Cool, thanks man
Chance

related questions