-1

我可能有一些微不足道的问题,但我如何在 Rails 中设置自定义 ID 会话?我需要这个,因为 Apple 的 Safari 网络浏览器默认配置为阻止第三方 cookie,我需要一些解决方法来在我的 facebook 应用程序中传递会话变量。我想在 GET 变量中设置这个 id。

我有 session_store 的:active_record_store。

4

2 回答 2

0

You can directly access the session variable and store anything inside it. Session variable is a hash. So maybe you want to access it as session[:id] = "value". I don't know if you are looking for this or something else.

于 2012-11-23T14:48:56.800 回答
0

手动更改或设置 session_id 不是一个好主意。我建议使用 facebook cookie 对用户进行身份验证,然后您应该在每个请求中发送所有需要的参数。

脸书饼干

于 2012-11-23T15:09:02.483 回答