We&#39;re using ActiveRecordStore for session management.&nbsp; So the session data is actually being saved in the database I believe, and all that is going in the cookie (should be) the session ID.<br><br>I have no idea why that session ID is not getting sent.&nbsp; So as a work around, we included the session ID into the Flash Vars that get loaded into the SWF with the fb:swf tag.&nbsp; Then our Flex app appends the _session_id to every call back to the rails server.&nbsp; This forces the rails app to use the correct (original) session.<br>
<br>Thanks!<br><br><div class="gmail_quote">On Mon, Feb 9, 2009 at 4:12 PM, Aaron Nemoyten <span dir="ltr">&lt;<a href="mailto:swivelmaster@yahoo.com">swivelmaster@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div style="font-family: &#39;times new roman&#39;,&#39;new york&#39;,times,serif; font-size: 12pt;"><div>Brian,</div><div><br></div><div>Chances are that the problem is a little weirder than you think.</div><div><br>
</div><div>All calls that Flex makes should seem to originate from the same page the app is embedded in. &nbsp;So if you&#39;re talking about the session being stored in the cookies, then you&#39;re relying on the browser&#39;s cookie policy to get it right for you.</div>
<div><br></div><div>Is this what you mean by &#39;session&#39; - the Rails cookie-based session data?</div><div><br></div><div>I can give you some pointers on how to make it work correctly if that&#39;s what&#39;s happening. &nbsp;(Hint: &nbsp;Don&#39;t rely on cookies at all.)</div>
<div><br></div><div>-Aaron</div><div><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font size="2" face="Tahoma"><hr size="1">
<b><span style="font-weight: bold;">From:</span></b> Brian Culler &lt;<a href="mailto:brian@brianculler.com" target="_blank">brian@brianculler.com</a>&gt;<br><b><span style="font-weight: bold;">To:</span></b> <a href="mailto:facebooker-talk@rubyforge.org" target="_blank">facebooker-talk@rubyforge.org</a><br>
<b><span style="font-weight: bold;">Sent:</span></b> Monday, February 9, 2009 8:47:38 AM<br><b><span style="font-weight: bold;">Subject:</span></b> [Facebooker-talk] Flex, facebooker, and sessions not being maintained<br>
</font><div><div></div><div class="Wj3C7c"><br>
I have a Flex based SWF being loaded with FBML into my facebook application.&nbsp;&nbsp; When the application is initially loaded and the SWF is served up, a rails session is created.&nbsp; At that request, I have a full facebooker session object and everything is fine.<br>

<br>However, on any subsequent *flex* requests back to our API (using httpservice), it doesn&#39;t maintain that initial session setup when the application first loaded.&nbsp; It creates a new session, and the fb_sig parameters are no where to be found.&nbsp; <br>

<br>If I do a full browser refresh of the page though, it goes back and uses that initial session that was created when the app first loaded.&nbsp; It would appear that the browser is working with rails correctly to maintain the session, but since Flex doesn&#39;t send http calls through the browser that way, it gets a new session any time it makes a call by itself.&nbsp; <br>

<br>Any ideas on how to go about making the Flex app be able to talk back to the rails app and use the same initial session that was created upon loading the app?<br>
</div></div></div></div><div></div></div><br>



      </div></blockquote></div><br>