Facebook 会话无法在 Flash 和 PHP 之间运行
我们有一个与 Facebook 紧密集成的 Flash 网站。当用户注册时,我们会让他们允许与该网站关联的 Facebook 应用程序。这是通过 Adobe 的 AS3 Facebook API 库完成的。
当用户完成此操作后,他们应该能够注册、提交一些个人详细信息等。 Flash 将此请求发送到我们的 PHP,然后 PHP 会检查用户是否确实登录到 Facebook,并允许我们的应用程序登录。
我们遇到的问题是,当用户执行此操作时,PHP facebook 库会说该用户尚未登录。如果我们刷新页面并尝试再次注册,一切都会正常。
我想这是一个饼干的事情,但我们真的在这里用头撞墙,不明白为什么它不起作用。
干杯, 标记。
We have a Flash site that integrates heavily with Facebook. When users sign up we get them to allow a Facebook app that ties into the site. This is done through the AS3 Facebook API library from Adobe.
When users have done this, they should then be able to sign up, submitting some personal details and so on. The Flash sends this request to our PHP which then checks to see if the user is actually logged into Facebook, and has allowed our app.
The problem we're having is that when a user goes to do this, the PHP facebook library says that the user is not logged in. If we then refresh the page and try signing up again, everything works fine.
I'd imagine it's a cookie thing, but we're really banging our head against a wall here and can't figure out why it's not working.
Cheers,
Mark.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否使用 OAuth(很好的例子这里作者:chirs coenraets)
无论如何,您可能需要使用 flash php/js 代理(我认为是 php,因为这就是您使用的)来处理任何跨域策略问题。
Are you using OAuth (good example here by chirs coenraets)
Regardless, you may need to use a flash php/js proxy (php i presume since thats what your using) to deal with any crossdomain policy issues.