<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Recent Posts in 'Sending invitations gives me Facebooker::Session::SessionExpired ' | Pragmatic Forums</title>
    <link>http://forums.pragprog.com/forums/59/topics/355</link>
    <language>en-us</language>
    <ttl>60</ttl>
    <description></description>
    <item>
      <title>Sending invitations gives me Facebooker::Session::SessionExpired  posted by Ram Ravichandran @ Sat, 05 Apr 2008 05:26:13 -0000</title>
      <description>&lt;p&gt;The code seems to have been mucked up by the editor :(&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;def error_notification(from_user, to_user, url)
  send_as :notification
  recipients to_user
  debugger
  from from_user.facebook_session.user 
  fbml &amp;lt;&amp;lt;-MESSAGE
        &amp;lt;fb:fbml&gt;
        Here is the link to the error notification #{url} !!!
        Thanks&lt;br /&gt;
        &amp;lt;/fb:fbml&gt;
      MESSAGE
end&lt;/code&gt;&lt;/pre&gt;</description>
      <pubDate>Sat, 05 Apr 2008 05:26:13 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:59:355:2548</guid>
      <author>Ram Ravichandran</author>
      <link>http://forums.pragprog.com/forums/59/topics/355</link>
    </item>
    <item>
      <title>Sending invitations gives me Facebooker::Session::SessionExpired  posted by Ram Ravichandran @ Sat, 05 Apr 2008 05:23:37 -0000</title>
      <description>&lt;p&gt;Hey,&lt;/p&gt;


	&lt;p&gt;First off, I wanted to thank you, Mike for taking time to answer our queries. It&amp;#8217;s very hard to find authors who actually help their readers.&lt;/p&gt;


	&lt;p&gt;So, I am trying to send notifications to people using the Publisher. I am trying to send the messages in an asynchronous process (so I cannot use current_user). Facebooker requires that the from address is a real user.&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;def error_notification(from_user, to_user, url)
  send_as :notification
  recipients to_user
  from from_user.facebook_session.user 
end&lt;/code&gt;&lt;/pre&gt;


	&lt;pre&gt;&lt;code&gt;fbml &amp;lt;&amp;lt;-MESSAGE
      &amp;lt;fb:fbml&gt;
      Here is the link to the error notification #{url} !!!
      &lt;br /&gt;
      Thanks&lt;br /&gt;
      &amp;lt;/fb:fbml&gt;
    MESSAGE&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;This gives me:&lt;/p&gt;


	&lt;p&gt;Facebooker::Session::SessionExpired (Session key invalid or no longer valid):
    /vendor/plugins/facebooker/lib/facebooker/parser.rb:386:in `process&amp;#8217;
    /vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in `parse&amp;#8217;
    /vendor/plugins/facebooker/lib/facebooker/service.rb:13:in `post&amp;#8217;
    /vendor/plugins/facebooker/lib/facebooker/session.rb:399:in `post&amp;#8217;
    /vendor/plugins/facebooker/lib/facebooker/session.rb:268:in `send_notification&amp;#8217;
    /vendor/plugins/facebooker/lib/facebooker/rails/publisher.rb:158:in `send_message&amp;#8217;
    /vendor/plugins/facebooker/lib/facebooker/rails/publisher.rb:237:in `method_missing&amp;#8217;
    /app/controllers/cart_controller.rb:362:in `send_error_notification&amp;#8217;&lt;br /&gt;....&lt;br /&gt;....&lt;/p&gt;


	&lt;p&gt;I think the session that gets stored in the user table isn&amp;#8217;t infinite. How do I send notifications in an offline setting?&lt;/p&gt;


	&lt;p&gt;Thanks,&lt;/p&gt;


	&lt;p&gt;Ram&lt;/p&gt;</description>
      <pubDate>Sat, 05 Apr 2008 05:23:37 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:59:355:2547</guid>
      <author>Ram Ravichandran</author>
      <link>http://forums.pragprog.com/forums/59/topics/355</link>
    </item>
  </channel>
</rss>
