简体   繁体   中英

iframe app not getting a user id even though logged in

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_request to 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_request to flash via flashvars on 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 cookie with name fbsr_APPID which will contain signed_request so it may be accessed from flash.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM