I'm running in to a couple of issues and wondered if anyone had any insight. I'm using the latest php-sdk I'm developing a canvas app that has a number of different steps. These steps are spread across multiple pages. Now when I first enter the app everything seems to work fine. The access token is there and I can call the api functions. On the second page (which is linked to in the same iframe) I get OAuth errors. Now if I use this on the 2nd page:

$me = $facebook->getUser();
var_dump($me);

it returns the correct user id, but I still get errors when trying to use an api query (specifically a FQL one in this instance)

Now, bear in mind these links are within the iframe so I was assuming the signed_request is getting lost somewhere, I know facebook normally issues this via a POST. If I set all my links to target="_parent" with a url such as http://apps.facebook.com/myapp/page2.php then everything works fine. Facebook clearly posts the correct info this time. Subsequently, then when I use links that only redirect the iframe it seems to work fine again (implying a cookie is being set somewhere).

Now I've seen other apps that don't have a target="_parent" that seem to work correctly, only ever loading the iframe on subsequent clicks and not the full facebook site. So I can only assume they are storing this info somewhere. I've tried to inspect these apps using httpfox but I can't see anything obvious. Does anyone have any links for best practice with multiple page apps? I know I can get around this using full urls and target="_blank" but I would like to know what's going on here. I've looked through the developer docs and the canvas page examples, but there's nothing obvious to me.

Hi, thanks for replying. I have the javascript SDK on the page, the script is definitely loading. What's weird is I've used the exact same set-up on a website using facebook for login and it works perfectly. I tried setting a cookie with the value of $_REQUEST['signed_request'] but even that doesn't seem to be accessible on the subsequent page
–
TommyBsDec 30 '11 at 20:44

I've accepted this as correct as technically it is, but for what it's worth, I was missing a quote, hence it was working. What's weird is firebug etc. was showing the js loading, but clearly it wasn't executing
–
TommyBsDec 31 '11 at 16:23