Flash not surviving a redirect in Facebook on a Rails application

0 views
Skip to first unread message

J. Pablo Fernández

unread,
Feb 6, 2010, 6:43:50 PM2/6/10
to facebooker
Hello Facebookerers, :)

I'm not really sure if this is related to Facebooker but if someone
knows what's going on it must be people using Facebooker

I have the following two action methods:

def index
puts "==index== flash: #{flash.inspect}"
end

def create
flash[:notice] = "Blah"
puts "==create== flash: #{flash.inspect}"
redirect_to(:action => :index)
end

index.fbml.erb contains this:

<%= button_to_with_facebooker "Blah!", :action => :create %>

The application is used through Facebook. I click the button and the
flash contains the notice while create is being executed, but after
that it's empty again. It doesn't survive a redirect.

Any ideas what's going on here?

Thanks.

Mike Mangino

unread,
Feb 8, 2010, 9:04:47 AM2/8/10
to faceb...@googlegroups.com
There were a couple of versions of Facebooker that had problems with the cookie store. Can you try upgrading to the newest version which is 1.0.62?

Mike

> --
> You received this message because you are subscribed to the Google Groups "facebooker" group.
> To post to this group, send email to faceb...@googlegroups.com.
> To unsubscribe from this group, send email to facebooker+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/facebooker?hl=en.
>

--
Mike Mangino
http://www.elevatedrails.com

Mark Wilden

unread,
Feb 24, 2010, 8:44:22 PM2/24/10
to facebooker
On Feb 8, 6:04 am, Mike Mangino <mmang...@elevatedrails.com> wrote:

> There were a couple of versions of Facebooker that had problems with the cookie store. Can you try upgrading to the newest version which is 1.0.62?

This situation still appears to occur with 1.0.63. No flash contents
after a redirect.

///ark

Mike Mangino

unread,
Feb 25, 2010, 9:03:45 AM2/25/10
to faceb...@googlegroups.com
Odd. Is the session id changing? What's happening with the cookie contents? Does changing to a different session store fix things?

Mike

Mark Wilden

unread,
Mar 6, 2010, 5:59:23 PM3/6/10
to faceb...@googlegroups.com
On Thu, Feb 25, 2010 at 6:03 AM, Mike Mangino
<mman...@elevatedrails.com> wrote:

> Odd. Is the session id changing? What's happening with the cookie contents? Does changing to a different session store fix things?

Sorry - false alarm. I had an old facebooker plugin installed as well
as the current gem. All is well.

///ark

zziemke

unread,
Mar 9, 2010, 1:35:57 PM3/9/10
to facebooker
How did you fix it?
Did have to configure something?

It's not working for me, when using 1.0.64 :(

On 6 Mrz., 23:59, Mark Wilden <m...@mwilden.com> wrote:
> On Thu, Feb 25, 2010 at 6:03 AM, Mike Mangino
>

> <mmang...@elevatedrails.com> wrote:
> > Odd. Is the session id changing? What's happening with the cookie contents? Does changing to a different session store fix things?
>
> Sorry - false alarm. I had an old facebooker plugin installed as well
> as the current gem. All is well.
>
> ///ark
>
>
>
> > Mike
>
> > On Feb 24, 2010, at 8:44 PM, Mark Wilden wrote:
>
> >> On Feb 8, 6:04 am, Mike Mangino <mmang...@elevatedrails.com> wrote:
>
> >>> There were a couple of versions of Facebooker that had problems with the cookie store. Can you try upgrading to the newest version which is 1.0.62?
>
> >> This situation still appears to occur with 1.0.63. Noflashcontents
> >> after a redirect.
>
> >> ///ark
>
> >>> On Feb 6, 2010, at 6:43 PM, J. Pablo Fernández wrote:
>
> >>>> I'm not really sure if this is related to Facebooker but if someone
> >>>> knows what's going on it must be people using Facebooker
>
> >>>> I have the following two action methods:
>
> >>>>    def index

> >>>>      puts "==index==flash: #{flash.inspect}"


> >>>>    end
>
> >>>>    def create
> >>>>      flash[:notice] = "Blah"

> >>>>      puts "==create==flash: #{flash.inspect}"


> >>>>      redirect_to(:action => :index)
> >>>>    end
>
> >>>> index.fbml.erb contains this:
>
> >>>>    <%= button_to_with_facebooker "Blah!", :action => :create %>
>
> >>>> The application is used through Facebook. I click the button and the

> >>>>flashcontains the notice while create is being executed, but after


> >>>> that it's empty again. It doesn't survive a redirect.
>
> >>>> Any ideas what's going on here?
>
> >>>> Thanks.
>
> >>>> --
> >>>> You received this message because you are subscribed to the Google Groups "facebooker" group.
> >>>> To post to this group, send email to faceb...@googlegroups.com.
> >>>> To unsubscribe from this group, send email to facebooker+...@googlegroups.com.
> >>>> For more options, visit this group athttp://groups.google.com/group/facebooker?hl=en.
>
> >>> --
> >>> Mike Manginohttp://www.elevatedrails.com
>
> >> --
> >> You received this message because you are subscribed to the Google Groups "facebooker" group.
> >> To post to this group, send email to faceb...@googlegroups.com.
> >> To unsubscribe from this group, send email to facebooker+...@googlegroups.com.

> >> For more options, visit this group athttp://groups.google.com/group/facebooker?hl=en.

Mark Wilden

unread,
Mar 9, 2010, 2:01:46 PM3/9/10
to faceb...@googlegroups.com
On Tue, Mar 9, 2010 at 10:35 AM, zziemke <zzi...@googlemail.com> wrote:

> How did you fix it?
> Did have to configure something?
>
> It's not working for me, when using 1.0.64 :(

I'm afraid all I did to fix it was to remove the old plugin and make
sure I had the 1.0.64 gem installed.

Also, I'm only testing this with Karate Poke application in Mike's book.

///ark

zziemke

unread,
Mar 9, 2010, 3:17:00 PM3/9/10
to facebooker
Can you send me your source code, pls?

On 9 Mrz., 20:01, Mark Wilden <m...@mwilden.com> wrote:

Mark Wilden

unread,
Mar 9, 2010, 3:23:48 PM3/9/10
to faceb...@googlegroups.com
On Tue, Mar 9, 2010 at 12:17 PM, zziemke <zzi...@googlemail.com> wrote:

> Can you send me your source code, pls?

The source is on the book site, actually.

///ark

zziemke

unread,
Mar 10, 2010, 4:38:37 PM3/10/10
to facebooker
But that one is not working for me :(

On 9 Mrz., 21:23, Mark Wilden <m...@mwilden.com> wrote:

zziemke

unread,
Mar 19, 2010, 6:55:27 PM3/19/10
to facebooker
it now works in my canvas app..

buut
only sometimes :(
30% of the times the flash survives
70% it doesnt

i am using the default session_store

when using activerecord store it isnt't working at all :(

this is urgent!

can't anybody help? :(

Mark Wilden

unread,
Mar 19, 2010, 9:02:24 PM3/19/10
to faceb...@googlegroups.com
On Fri, Mar 19, 2010 at 3:55 PM, zziemke <zzi...@googlemail.com> wrote:
> it now works in my canvas app..
>
> buut
> only sometimes :(
> 30% of the times the flash survives
> 70% it doesnt
>
> i am using the default session_store
>
> when using activerecord store it isnt't working at all :(
>
> this is urgent!

Yes, I spoke too soon - I'm seeing the same thing. Sometimes it works
and sometimes it doesn't.

///ark

zziemke

unread,
Mar 20, 2010, 5:38:56 AM3/20/10
to facebooker
Is there no way to fix this?

I have already deployed my app and it relys on the flash hash because
i am utilising it to temporarily store data for the publisher
without the fb_publisher my app wont spread :(

On 20 Mrz., 02:02, Mark Wilden <m...@mwilden.com> wrote:

Mike Mangino

unread,
Mar 20, 2010, 9:17:22 PM3/20/10
to faceb...@googlegroups.com
What session store are you using? What browsers work and which ones don't? What version of Rails are you using? Does using a 2.2 version fix things?

I wouldn't use the cookie store, I would use the activerecord store and use the facebook session id for the session key.


Mike

> --
> You received this message because you are subscribed to the Google Groups "facebooker" group.
> To post to this group, send email to faceb...@googlegroups.com.
> To unsubscribe from this group, send email to facebooker+...@googlegroups.com.

> For more options, visit this group at http://groups.google.com/group/facebooker?hl=en.

zziemke

unread,
Mar 22, 2010, 10:54:14 AM3/22/10
to facebooker
Hi mike! Thanks for addressing our issue

We were using the cookie store, and tested the app using Firefox (Mac/
Win Version)

We also tried to use the activerecord store but with this
configuration it didnt work at all (we didn't consider setting a
session key, maybe that was the problem)
We are running on rails 1.3.6.

We switched to memcached and everything works fine now :)

I'll try your advice the day after tomorrow, since I am to busy with
work until then.

Reply all
Reply to author
Forward
0 new messages