I am currently building a flash game, and I’ve created an iframe app for that
Now the html is in the index file, as well as the php script that handles the requests from the flash object.
The problem is that when the user opens my app, he sees the flash object and I get a user id echoed, but whenever the flash object sends a request to index.php (the same file where the whole html and the flash embed is), I don’t get a user id (I’m using the function getUser(), should be fine, right?).
I don’t know why I couldn’t find any similar questions, might just be me.
Your flash application doesn’t sent
signed_requestto your php script (and probably any other session identifier too, if any), so you’re not able to get the desired info.You should add
signed_request(and/or session identifier) parameter to request issuing to your php script…You can pass
signed_requestto flash viaflashvarson initialization or via call to JavaScript which will provide this data to flash so it can be passed with every request from flash to server…Another option is to use Facebook JavaScript SDK which will set
cookiewith namefbsr_APPIDwhich will containsigned_requestso it may be accessed from flash.