I have an app tab which does not require the user to authorize the app. When the tab first loads, I have access to the signed request like so: $signed_request = $facebook->getSignedRequest();
The app then makes various AJAX calls to the server. With each AJAX call, signed_request is not persisted. I would like the signed_request to be available during these AJAX calls so I can do $signed_request = $facebook->getSignedRequest(); again.
I have read that when a user is logged in, the JS SDK and PHP SDK share the signed_request via a cookie. Is there a cookie I can set during the initial page load that will persist signed_request during AJAX calls, so it is accessible through the PHP SDK?
Why don’t you just add it as a parameter to your AJAX calls …?
You know the parameter name, you know the value – so just put it in there with the other data you’re sending.