From zhao.lu.us at gmail.com Tue Sep 2 13:31:01 2008 From: zhao.lu.us at gmail.com (Zhao Lu) Date: Tue, 2 Sep 2008 10:31:01 -0700 Subject: [Facebooker-talk] facebooker + play music Message-ID: I'd like to play a mid file, which is located on my server, from my application in facebook. I did some search on google but couldn't find any lead. Is there some support for this in facebooker? Thanks, -- Zhao From costan at gmail.com Wed Sep 3 02:28:42 2008 From: costan at gmail.com (Victor Costan) Date: Wed, 3 Sep 2008 02:28:42 -0400 Subject: [Facebooker-talk] What should I do to get my patches reviewed? Message-ID: <59578a2b0809022328s51d750c8pa617e8d968bf2a32@mail.gmail.com> Dear Facebooker team, I've been using Facebooker for the past couple of weeks, and I made some adjustments that I believe would benefit every other Facebook developer. I have submitted them as patches, but it seems like nobody noticed them. I would like to have them integrated in Facebooker trunk, so I can contribute a bit, in return for the benefits I'm getting by using Facebooker. The patches are: http://rubyforge.org/tracker/index.php?func=detail&aid=21787&group_id=4187&atid=16132 http://rubyforge.org/tracker/index.php?func=detail&aid=21783&group_id=4187&atid=16132 http://rubyforge.org/tracker/index.php?func=detail&aid=21731&group_id=4187&atid=16132 http://rubyforge.org/tracker/index.php?func=detail&aid=21665&group_id=4187&atid=16132 http://rubyforge.org/tracker/index.php?func=detail&aid=21653&group_id=4187&atid=16132 Thank you very much for writing this awesome plug-in! Victor From mmangino at elevatedrails.com Wed Sep 3 07:09:09 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 3 Sep 2008 07:09:09 -0400 Subject: [Facebooker-talk] What should I do to get my patches reviewed? In-Reply-To: <59578a2b0809022328s51d750c8pa617e8d968bf2a32@mail.gmail.com> References: <59578a2b0809022328s51d750c8pa617e8d968bf2a32@mail.gmail.com> Message-ID: Victor, Sorry about the confusion. We moved the code to github. You can fork the repository on github and then I can pull changes from you. Mike On Sep 3, 2008, at 2:28 AM, Victor Costan wrote: > Dear Facebooker team, > > I've been using Facebooker for the past couple of weeks, and I made > some adjustments that I believe would benefit every other Facebook > developer. I have submitted them as patches, but it seems like nobody > noticed them. I would like to have them integrated in Facebooker > trunk, so I can contribute a bit, in return for the benefits I'm > getting by using Facebooker. > > > The patches are: > http://rubyforge.org/tracker/index.php?func=detail&aid=21787&group_id=4187&atid=16132 > http://rubyforge.org/tracker/index.php?func=detail&aid=21783&group_id=4187&atid=16132 > http://rubyforge.org/tracker/index.php?func=detail&aid=21731&group_id=4187&atid=16132 > http://rubyforge.org/tracker/index.php?func=detail&aid=21665&group_id=4187&atid=16132 > http://rubyforge.org/tracker/index.php?func=detail&aid=21653&group_id=4187&atid=16132 > > > Thank you very much for writing this awesome plug-in! > Victor > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From auswalk at gmail.com Thu Sep 4 00:37:28 2008 From: auswalk at gmail.com (Allen Walker) Date: Wed, 03 Sep 2008 23:37:28 -0500 Subject: [Facebooker-talk] fb_comments and fb_board not working Message-ID: <48BF6608.5020107@gmail.com> It would sure be nice if these would work. I have the following in my home controller: <%= fb_board("golf_board1") %> it renders: The discussion board shows on my page, but when I click start new topic, it reloads the previous URL (default callback) and continues to display "Start new topic". fb_comments does the same thing. Btw my URL is this after clicking "start new topic" http://apps.new.facebook.com/myapp/?fbapp_ec=751 thanks From auswalk at gmail.com Thu Sep 4 01:01:14 2008 From: auswalk at gmail.com (Allen Walker) Date: Thu, 04 Sep 2008 00:01:14 -0500 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: <48BF6608.5020107@gmail.com> References: <48BF6608.5020107@gmail.com> Message-ID: <48BF6B9A.5010503@gmail.com> I made a small change: <%= fb_board("golf_board1", :callbackurl => url_for(:controller=>"home", :action=>"index", :only_path=>false)) %> The discussion board then shows up if I click on start a new topic. However once I enter a topic and post, and return back to the main page, it still shows I have no topics entered. Allen Walker wrote: > It would sure be nice if these would work. > > I have the following in my home controller: > > <%= fb_board("golf_board1") %> > > it renders: > > > > The discussion board shows on my page, but when I click start new > topic, it reloads the previous URL (default callback) and continues to > display "Start new topic". > > fb_comments does the same thing. > > > Btw my URL is this after clicking "start new topic" > > http://apps.new.facebook.com/myapp/?fbapp_ec=751 > > thanks > From zhao.lu.us at gmail.com Thu Sep 4 01:06:52 2008 From: zhao.lu.us at gmail.com (Zhao Lu) Date: Wed, 3 Sep 2008 22:06:52 -0700 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: <48BF6608.5020107@gmail.com> References: <48BF6608.5020107@gmail.com> Message-ID: I haven't tried fb_board but I did get fb_comment working. The instruction in the beta _book_ wasn't quite complete and I had to look at the source code for chapter 8 to get things working. I had the same problem with you (or at least I think it's the same problem). Basically I type some comment in the text area and click submit and nothing 'happens'. When I look into the database table the new comment is there so what I was missing was to pull the comments out from the table and display them. My code structure is pretty much the same as karate poke. I have this code snippet in my view: <% form_for Comment.new do %> Comment on gifts:
<%= text_area_tag :body %>
<%= hidden_field_tag :comment_receiver, @user.id %> <%= submit_tag 'Post' %> <% end %>
<%= render :partial=>"comments/comments" %>
I was missing the
...
portion before. Do you have that and the _comments.erb partial in place? Zhao On Wed, Sep 3, 2008 at 9:37 PM, Allen Walker wrote: > It would sure be nice if these would work. > > I have the following in my home controller: > > <%= fb_board("golf_board1") %> > > it renders: > > > > The discussion board shows on my page, but when I click start new topic, it > reloads the previous URL (default callback) and continues to display "Start > new topic". > > fb_comments does the same thing. > > > Btw my URL is this after clicking "start new topic" > > http://apps.new.facebook.com/myapp/?fbapp_ec=751 > > thanks > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > -- Zhao From auswalk at gmail.com Thu Sep 4 01:46:36 2008 From: auswalk at gmail.com (Allen Walker) Date: Thu, 04 Sep 2008 00:46:36 -0500 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: References: <48BF6608.5020107@gmail.com> Message-ID: <48BF763C.5070706@gmail.com> Actually I'm not even doing that. You are internally storing you own comments. I'm simply attempting to use facebooks built in servers to run my dicussion boards and comments via the and code. It should be rather trivial and for some reason it's not working. It must have something to do with how facebook is reading the URL and not correctly mapping it to the xid. Zhao Lu wrote: > I haven't tried fb_board but I did get fb_comment working. The > instruction in the beta _book_ wasn't quite > complete and I had to look at the source code for chapter 8 to get > things working. I had the same problem > with you (or at least I think it's the same problem). Basically I > type some comment in the text area and click > submit and nothing 'happens'. When I look into the database table the > new comment is there so what I was > missing was to pull the comments out from the table and display them. > > My code structure is pretty much the same as karate poke. I have this > code snippet in my view: > > <% form_for Comment.new do %> > Comment on gifts:
> <%= text_area_tag :body %>
> <%= hidden_field_tag :comment_receiver, @user.id %> > <%= submit_tag 'Post' %> > <% end %> > >
> <%= render :partial=>"comments/comments" %> >
> > I was missing the
...
portion before. Do you have that and > the _comments.erb partial in place? > > Zhao > > On Wed, Sep 3, 2008 at 9:37 PM, Allen Walker wrote: > >> It would sure be nice if these would work. >> >> I have the following in my home controller: >> >> <%= fb_board("golf_board1") %> >> >> it renders: >> >> >> >> The discussion board shows on my page, but when I click start new topic, it >> reloads the previous URL (default callback) and continues to display "Start >> new topic". >> >> fb_comments does the same thing. >> >> >> Btw my URL is this after clicking "start new topic" >> >> http://apps.new.facebook.com/myapp/?fbapp_ec=751 >> >> thanks >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> > > > > From auswalk at gmail.com Thu Sep 4 03:02:37 2008 From: auswalk at gmail.com (Allen Walker) Date: Thu, 04 Sep 2008 02:02:37 -0500 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: References: <48BF6608.5020107@gmail.com> <48BF763C.5070706@gmail.com> Message-ID: <48BF880D.3050704@gmail.com> Sadly, to do comments I had to implement what you have done, which theoretically is much harder than just using the built in facebook comments tag. Now that I wish to use a discussion board, it really behooves me to figure this out b/c a discussion board is much more advanced than just comments. Zhao Lu wrote: > you are ahead of me, again. > > On Wed, Sep 3, 2008 at 10:46 PM, Allen Walker wrote: > >> Actually I'm not even doing that. You are internally storing you own >> comments. >> >> I'm simply attempting to use facebooks built in servers to run my dicussion >> boards and comments via the and code. It should be >> rather trivial and for some reason it's not working. It must have something >> to do with how facebook is reading the URL and not correctly mapping it to >> the xid. >> >> Zhao Lu wrote: >> >>> I haven't tried fb_board but I did get fb_comment working. The >>> instruction in the beta _book_ wasn't quite >>> complete and I had to look at the source code for chapter 8 to get >>> things working. I had the same problem >>> with you (or at least I think it's the same problem). Basically I >>> type some comment in the text area and click >>> submit and nothing 'happens'. When I look into the database table the >>> new comment is there so what I was >>> missing was to pull the comments out from the table and display them. >>> >>> My code structure is pretty much the same as karate poke. I have this >>> code snippet in my view: >>> >>> <% form_for Comment.new do %> >>> Comment on gifts:
>>> <%= text_area_tag :body %>
>>> <%= hidden_field_tag :comment_receiver, @user.id %> >>> <%= submit_tag 'Post' %> >>> <% end %> >>> >>>
>>> <%= render :partial=>"comments/comments" %> >>>
>>> >>> I was missing the
...
portion before. Do you have that and >>> the _comments.erb partial in place? >>> >>> Zhao >>> >>> On Wed, Sep 3, 2008 at 9:37 PM, Allen Walker wrote: >>> >>> >>>> It would sure be nice if these would work. >>>> >>>> I have the following in my home controller: >>>> >>>> <%= fb_board("golf_board1") %> >>>> >>>> it renders: >>>> >>>> >>>> >>>> The discussion board shows on my page, but when I click start new topic, >>>> it >>>> reloads the previous URL (default callback) and continues to display >>>> "Start >>>> new topic". >>>> >>>> fb_comments does the same thing. >>>> >>>> >>>> Btw my URL is this after clicking "start new topic" >>>> >>>> http://apps.new.facebook.com/myapp/?fbapp_ec=751 >>>> >>>> thanks >>>> _______________________________________________ >>>> >>>> From zhao.lu.us at gmail.com Thu Sep 4 11:52:32 2008 From: zhao.lu.us at gmail.com (Zhao Lu) Date: Thu, 4 Sep 2008 08:52:32 -0700 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: <48BF880D.3050704@gmail.com> References: <48BF6608.5020107@gmail.com> <48BF763C.5070706@gmail.com> <48BF880D.3050704@gmail.com> Message-ID: Hmm that shouldn't be the case. I had to internally store the comments because I wanted to be able to search them. As far as discussion board goes, I'd really love to use the fbml rather than implementing it. Since I'm new to this whole rails thing, all I can think of is to look at the test cases (rails app should be well tested, right?). I found a bunch of tests under vendor/plugins/facebooker/test/. rails_integration_test.rb contains some test cases on comments and fb_board. I was hoping to figure out the usage of them by merely looking at the test case. I'm not sure if you've looked at those and if they're helpful to you. I figured if they aren't then it means the test coverage can be improved. So you (or facebooker users like us) could probably improve it by adding new test cases, which should also help with debugging our problems as well. Zhao On Thu, Sep 4, 2008 at 12:02 AM, Allen Walker wrote: > Sadly, to do comments I had to implement what you have done, which > theoretically is much harder than just using the built in facebook comments > tag. Now that I wish to use a discussion board, it really behooves me to > figure this out b/c a discussion board is much more advanced than just > comments. > > Zhao Lu wrote: >> >> you are ahead of me, again. >> >> On Wed, Sep 3, 2008 at 10:46 PM, Allen Walker wrote: >> >>> >>> Actually I'm not even doing that. You are internally storing you own >>> comments. >>> >>> I'm simply attempting to use facebooks built in servers to run my >>> dicussion >>> boards and comments via the and code. It should >>> be >>> rather trivial and for some reason it's not working. It must have >>> something >>> to do with how facebook is reading the URL and not correctly mapping it >>> to >>> the xid. >>> >>> Zhao Lu wrote: >>> >>>> >>>> I haven't tried fb_board but I did get fb_comment working. The >>>> instruction in the beta _book_ wasn't quite >>>> complete and I had to look at the source code for chapter 8 to get >>>> things working. I had the same problem >>>> with you (or at least I think it's the same problem). Basically I >>>> type some comment in the text area and click >>>> submit and nothing 'happens'. When I look into the database table the >>>> new comment is there so what I was >>>> missing was to pull the comments out from the table and display them. >>>> >>>> My code structure is pretty much the same as karate poke. I have this >>>> code snippet in my view: >>>> >>>> <% form_for Comment.new do %> >>>> Comment on gifts:
>>>> <%= text_area_tag :body %>
>>>> <%= hidden_field_tag :comment_receiver, @user.id %> >>>> <%= submit_tag 'Post' %> >>>> <% end %> >>>> >>>>
>>>> <%= render :partial=>"comments/comments" %> >>>>
>>>> >>>> I was missing the
...
portion before. Do you have that and >>>> the _comments.erb partial in place? >>>> >>>> Zhao >>>> >>>> On Wed, Sep 3, 2008 at 9:37 PM, Allen Walker wrote: >>>> >>>> >>>>> >>>>> It would sure be nice if these would work. >>>>> >>>>> I have the following in my home controller: >>>>> >>>>> <%= fb_board("golf_board1") %> >>>>> >>>>> it renders: >>>>> >>>>> >>>>> >>>>> The discussion board shows on my page, but when I click start new >>>>> topic, >>>>> it >>>>> reloads the previous URL (default callback) and continues to display >>>>> "Start >>>>> new topic". >>>>> >>>>> fb_comments does the same thing. >>>>> >>>>> >>>>> Btw my URL is this after clicking "start new topic" >>>>> >>>>> http://apps.new.facebook.com/myapp/?fbapp_ec=751 >>>>> >>>>> thanks >>>>> _______________________________________________ >>>>> >>>>> > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > -- Zhao From digidigo at gmail.com Thu Sep 4 12:09:21 2008 From: digidigo at gmail.com (David Clements) Date: Thu, 4 Sep 2008 10:09:21 -0600 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: References: <48BF6608.5020107@gmail.com> <48BF763C.5070706@gmail.com> <48BF880D.3050704@gmail.com> Message-ID: Not totally sure what your issues are but did you look at the comments section on the facebooker tutorial. They appear to be working there, although in there simplest form. http://apps.new.facebook.com/facebooker_tutorial/fbml/comments I haven't tried the board yet though. Dave On Thu, Sep 4, 2008 at 9:52 AM, Zhao Lu wrote: > Hmm that shouldn't be the case. I had to internally store the comments > because I wanted to be able to search them. As far as discussion board > goes, I'd really love to use the fbml rather than implementing it. > > Since I'm new to this whole rails thing, all I can think of is to look at > the > test cases (rails app should be well tested, right?). I found a bunch > of tests under > vendor/plugins/facebooker/test/. rails_integration_test.rb > contains some test cases on comments and fb_board. I was hoping to figure > out the usage of them by merely looking at the test case. I'm not sure if > you've looked at those and if they're helpful to you. > I figured if they aren't then it means the test coverage can be improved. > So > you (or facebooker users like us) could probably improve it by adding new > test > cases, which should also help with debugging our problems as well. > > Zhao > > On Thu, Sep 4, 2008 at 12:02 AM, Allen Walker wrote: > > Sadly, to do comments I had to implement what you have done, which > > theoretically is much harder than just using the built in facebook > comments > > tag. Now that I wish to use a discussion board, it really behooves me to > > figure this out b/c a discussion board is much more advanced than just > > comments. > > > > Zhao Lu wrote: > >> > >> you are ahead of me, again. > >> > >> On Wed, Sep 3, 2008 at 10:46 PM, Allen Walker > wrote: > >> > >>> > >>> Actually I'm not even doing that. You are internally storing you own > >>> comments. > >>> > >>> I'm simply attempting to use facebooks built in servers to run my > >>> dicussion > >>> boards and comments via the and code. It > should > >>> be > >>> rather trivial and for some reason it's not working. It must have > >>> something > >>> to do with how facebook is reading the URL and not correctly mapping it > >>> to > >>> the xid. > >>> > >>> Zhao Lu wrote: > >>> > >>>> > >>>> I haven't tried fb_board but I did get fb_comment working. The > >>>> instruction in the beta _book_ wasn't quite > >>>> complete and I had to look at the source code for chapter 8 to get > >>>> things working. I had the same problem > >>>> with you (or at least I think it's the same problem). Basically I > >>>> type some comment in the text area and click > >>>> submit and nothing 'happens'. When I look into the database table the > >>>> new comment is there so what I was > >>>> missing was to pull the comments out from the table and display them. > >>>> > >>>> My code structure is pretty much the same as karate poke. I have this > >>>> code snippet in my view: > >>>> > >>>> <% form_for Comment.new do %> > >>>> Comment on gifts:
> >>>> <%= text_area_tag :body %>
> >>>> <%= hidden_field_tag :comment_receiver, @user.id %> > >>>> <%= submit_tag 'Post' %> > >>>> <% end %> > >>>> > >>>>
> >>>> <%= render :partial=>"comments/comments" %> > >>>>
> >>>> > >>>> I was missing the
...
portion before. Do you have that and > >>>> the _comments.erb partial in place? > >>>> > >>>> Zhao > >>>> > >>>> On Wed, Sep 3, 2008 at 9:37 PM, Allen Walker > wrote: > >>>> > >>>> > >>>>> > >>>>> It would sure be nice if these would work. > >>>>> > >>>>> I have the following in my home controller: > >>>>> > >>>>> <%= fb_board("golf_board1") %> > >>>>> > >>>>> it renders: > >>>>> > >>>>> > >>>>> > >>>>> The discussion board shows on my page, but when I click start new > >>>>> topic, > >>>>> it > >>>>> reloads the previous URL (default callback) and continues to display > >>>>> "Start > >>>>> new topic". > >>>>> > >>>>> fb_comments does the same thing. > >>>>> > >>>>> > >>>>> Btw my URL is this after clicking "start new topic" > >>>>> > >>>>> http://apps.new.facebook.com/myapp/?fbapp_ec=751 > >>>>> > >>>>> thanks > >>>>> _______________________________________________ > >>>>> > >>>>> > > > > _______________________________________________ > > Facebooker-talk mailing list > > Facebooker-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > -- > Zhao > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From auswalk at gmail.com Thu Sep 4 12:53:58 2008 From: auswalk at gmail.com (Allen Walker) Date: Thu, 4 Sep 2008 11:53:58 -0500 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: References: <48BF6608.5020107@gmail.com> <48BF763C.5070706@gmail.com> <48BF880D.3050704@gmail.com> Message-ID: <971598f90809040953t79441d04vdd66034ccfda8885@mail.gmail.com> Yeah I've looked at that tutorial. It's very straightforward and I've tried it as it says with no luck. I've gotten everything else to work so i'm quite puzzled. It must have something to do with routing and url recognition is the only thing I can figure, as I believe the fb:board and fb:comments tag map based on the URL and the xid=value. On Thu, Sep 4, 2008 at 11:09 AM, David Clements wrote: > Not totally sure what your issues are but did you look at the comments > section on the facebooker tutorial. > > They appear to be working there, although in there simplest form. > > http://apps.new.facebook.com/facebooker_tutorial/fbml/comments > > I haven't tried the board yet though. > > > > Dave > > > On Thu, Sep 4, 2008 at 9:52 AM, Zhao Lu wrote: > >> Hmm that shouldn't be the case. I had to internally store the comments >> because I wanted to be able to search them. As far as discussion board >> goes, I'd really love to use the fbml rather than implementing it. >> >> Since I'm new to this whole rails thing, all I can think of is to look at >> the >> test cases (rails app should be well tested, right?). I found a bunch >> of tests under >> vendor/plugins/facebooker/test/. rails_integration_test.rb >> contains some test cases on comments and fb_board. I was hoping to figure >> out the usage of them by merely looking at the test case. I'm not sure if >> you've looked at those and if they're helpful to you. >> I figured if they aren't then it means the test coverage can be improved. >> So >> you (or facebooker users like us) could probably improve it by adding new >> test >> cases, which should also help with debugging our problems as well. >> >> Zhao >> >> On Thu, Sep 4, 2008 at 12:02 AM, Allen Walker wrote: >> > Sadly, to do comments I had to implement what you have done, which >> > theoretically is much harder than just using the built in facebook >> comments >> > tag. Now that I wish to use a discussion board, it really behooves me to >> > figure this out b/c a discussion board is much more advanced than just >> > comments. >> > >> > Zhao Lu wrote: >> >> >> >> you are ahead of me, again. >> >> >> >> On Wed, Sep 3, 2008 at 10:46 PM, Allen Walker >> wrote: >> >> >> >>> >> >>> Actually I'm not even doing that. You are internally storing you own >> >>> comments. >> >>> >> >>> I'm simply attempting to use facebooks built in servers to run my >> >>> dicussion >> >>> boards and comments via the and code. It >> should >> >>> be >> >>> rather trivial and for some reason it's not working. It must have >> >>> something >> >>> to do with how facebook is reading the URL and not correctly mapping >> it >> >>> to >> >>> the xid. >> >>> >> >>> Zhao Lu wrote: >> >>> >> >>>> >> >>>> I haven't tried fb_board but I did get fb_comment working. The >> >>>> instruction in the beta _book_ wasn't quite >> >>>> complete and I had to look at the source code for chapter 8 to get >> >>>> things working. I had the same problem >> >>>> with you (or at least I think it's the same problem). Basically I >> >>>> type some comment in the text area and click >> >>>> submit and nothing 'happens'. When I look into the database table >> the >> >>>> new comment is there so what I was >> >>>> missing was to pull the comments out from the table and display them. >> >>>> >> >>>> My code structure is pretty much the same as karate poke. I have >> this >> >>>> code snippet in my view: >> >>>> >> >>>> <% form_for Comment.new do %> >> >>>> Comment on gifts:
>> >>>> <%= text_area_tag :body %>
>> >>>> <%= hidden_field_tag :comment_receiver, @user.id %> >> >>>> <%= submit_tag 'Post' %> >> >>>> <% end %> >> >>>> >> >>>>
>> >>>> <%= render :partial=>"comments/comments" %> >> >>>>
>> >>>> >> >>>> I was missing the
...
portion before. Do you have that >> and >> >>>> the _comments.erb partial in place? >> >>>> >> >>>> Zhao >> >>>> >> >>>> On Wed, Sep 3, 2008 at 9:37 PM, Allen Walker >> wrote: >> >>>> >> >>>> >> >>>>> >> >>>>> It would sure be nice if these would work. >> >>>>> >> >>>>> I have the following in my home controller: >> >>>>> >> >>>>> <%= fb_board("golf_board1") %> >> >>>>> >> >>>>> it renders: >> >>>>> >> >>>>> >> >>>>> >> >>>>> The discussion board shows on my page, but when I click start new >> >>>>> topic, >> >>>>> it >> >>>>> reloads the previous URL (default callback) and continues to display >> >>>>> "Start >> >>>>> new topic". >> >>>>> >> >>>>> fb_comments does the same thing. >> >>>>> >> >>>>> >> >>>>> Btw my URL is this after clicking "start new topic" >> >>>>> >> >>>>> http://apps.new.facebook.com/myapp/?fbapp_ec=751 >> >>>>> >> >>>>> thanks >> >>>>> _______________________________________________ >> >>>>> >> >>>>> >> > >> > _______________________________________________ >> > Facebooker-talk mailing list >> > Facebooker-talk at rubyforge.org >> > http://rubyforge.org/mailman/listinfo/facebooker-talk >> > >> >> >> >> -- >> Zhao >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > > -- http://auswalk.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From digidigo at gmail.com Thu Sep 4 12:56:02 2008 From: digidigo at gmail.com (David Clements) Date: Thu, 4 Sep 2008 10:56:02 -0600 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: <971598f90809040953t79441d04vdd66034ccfda8885@mail.gmail.com> References: <48BF6608.5020107@gmail.com> <48BF763C.5070706@gmail.com> <48BF880D.3050704@gmail.com> <971598f90809040953t79441d04vdd66034ccfda8885@mail.gmail.com> Message-ID: Not sure about that. I don't set the url in the tutorial at all. Each lesson has it own comment block with just and xid. Dave On Thu, Sep 4, 2008 at 10:53 AM, Allen Walker wrote: > Yeah I've looked at that tutorial. It's very straightforward and I've tried > it as it says with no luck. I've gotten everything else to work so i'm quite > puzzled. It must have something to do with routing and url recognition is > the only thing I can figure, as I believe the fb:board and fb:comments tag > map based on the URL and the xid=value. > > > On Thu, Sep 4, 2008 at 11:09 AM, David Clements wrote: > >> Not totally sure what your issues are but did you look at the comments >> section on the facebooker tutorial. >> >> They appear to be working there, although in there simplest form. >> >> http://apps.new.facebook.com/facebooker_tutorial/fbml/comments >> >> I haven't tried the board yet though. >> >> >> >> Dave >> >> >> On Thu, Sep 4, 2008 at 9:52 AM, Zhao Lu wrote: >> >>> Hmm that shouldn't be the case. I had to internally store the comments >>> because I wanted to be able to search them. As far as discussion board >>> goes, I'd really love to use the fbml rather than implementing it. >>> >>> Since I'm new to this whole rails thing, all I can think of is to look at >>> the >>> test cases (rails app should be well tested, right?). I found a bunch >>> of tests under >>> vendor/plugins/facebooker/test/. rails_integration_test.rb >>> contains some test cases on comments and fb_board. I was hoping to >>> figure >>> out the usage of them by merely looking at the test case. I'm not sure >>> if >>> you've looked at those and if they're helpful to you. >>> I figured if they aren't then it means the test coverage can be improved. >>> So >>> you (or facebooker users like us) could probably improve it by adding new >>> test >>> cases, which should also help with debugging our problems as well. >>> >>> Zhao >>> >>> On Thu, Sep 4, 2008 at 12:02 AM, Allen Walker wrote: >>> > Sadly, to do comments I had to implement what you have done, which >>> > theoretically is much harder than just using the built in facebook >>> comments >>> > tag. Now that I wish to use a discussion board, it really behooves me >>> to >>> > figure this out b/c a discussion board is much more advanced than just >>> > comments. >>> > >>> > Zhao Lu wrote: >>> >> >>> >> you are ahead of me, again. >>> >> >>> >> On Wed, Sep 3, 2008 at 10:46 PM, Allen Walker >>> wrote: >>> >> >>> >>> >>> >>> Actually I'm not even doing that. You are internally storing you own >>> >>> comments. >>> >>> >>> >>> I'm simply attempting to use facebooks built in servers to run my >>> >>> dicussion >>> >>> boards and comments via the and code. It >>> should >>> >>> be >>> >>> rather trivial and for some reason it's not working. It must have >>> >>> something >>> >>> to do with how facebook is reading the URL and not correctly mapping >>> it >>> >>> to >>> >>> the xid. >>> >>> >>> >>> Zhao Lu wrote: >>> >>> >>> >>>> >>> >>>> I haven't tried fb_board but I did get fb_comment working. The >>> >>>> instruction in the beta _book_ wasn't quite >>> >>>> complete and I had to look at the source code for chapter 8 to get >>> >>>> things working. I had the same problem >>> >>>> with you (or at least I think it's the same problem). Basically I >>> >>>> type some comment in the text area and click >>> >>>> submit and nothing 'happens'. When I look into the database table >>> the >>> >>>> new comment is there so what I was >>> >>>> missing was to pull the comments out from the table and display >>> them. >>> >>>> >>> >>>> My code structure is pretty much the same as karate poke. I have >>> this >>> >>>> code snippet in my view: >>> >>>> >>> >>>> <% form_for Comment.new do %> >>> >>>> Comment on gifts:
>>> >>>> <%= text_area_tag :body %>
>>> >>>> <%= hidden_field_tag :comment_receiver, @user.id %> >>> >>>> <%= submit_tag 'Post' %> >>> >>>> <% end %> >>> >>>> >>> >>>>
>>> >>>> <%= render :partial=>"comments/comments" %> >>> >>>>
>>> >>>> >>> >>>> I was missing the
...
portion before. Do you have that >>> and >>> >>>> the _comments.erb partial in place? >>> >>>> >>> >>>> Zhao >>> >>>> >>> >>>> On Wed, Sep 3, 2008 at 9:37 PM, Allen Walker >>> wrote: >>> >>>> >>> >>>> >>> >>>>> >>> >>>>> It would sure be nice if these would work. >>> >>>>> >>> >>>>> I have the following in my home controller: >>> >>>>> >>> >>>>> <%= fb_board("golf_board1") %> >>> >>>>> >>> >>>>> it renders: >>> >>>>> >>> >>>>> >>> >>>>> >>> >>>>> The discussion board shows on my page, but when I click start new >>> >>>>> topic, >>> >>>>> it >>> >>>>> reloads the previous URL (default callback) and continues to >>> display >>> >>>>> "Start >>> >>>>> new topic". >>> >>>>> >>> >>>>> fb_comments does the same thing. >>> >>>>> >>> >>>>> >>> >>>>> Btw my URL is this after clicking "start new topic" >>> >>>>> >>> >>>>> http://apps.new.facebook.com/myapp/?fbapp_ec=751 >>> >>>>> >>> >>>>> thanks >>> >>>>> _______________________________________________ >>> >>>>> >>> >>>>> >>> > >>> > _______________________________________________ >>> > Facebooker-talk mailing list >>> > Facebooker-talk at rubyforge.org >>> > http://rubyforge.org/mailman/listinfo/facebooker-talk >>> > >>> >>> >>> >>> -- >>> Zhao >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >> >> > > > -- > http://auswalk.blogspot.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From auswalk at gmail.com Thu Sep 4 13:00:12 2008 From: auswalk at gmail.com (Allen Walker) Date: Thu, 4 Sep 2008 12:00:12 -0500 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: References: <48BF6608.5020107@gmail.com> <48BF763C.5070706@gmail.com> <48BF880D.3050704@gmail.com> <971598f90809040953t79441d04vdd66034ccfda8885@mail.gmail.com> Message-ID: <971598f90809041000r5ea6fb8era1758996134b6491@mail.gmail.com> Hmm. well what if you used the same xid on different pages. I wouldn't think it would pull in the comments from the other page right? On Thu, Sep 4, 2008 at 11:56 AM, David Clements wrote: > Not sure about that. I don't set the url in the tutorial at all. Each > lesson has it own comment block with just and xid. > > Dave > > > > On Thu, Sep 4, 2008 at 10:53 AM, Allen Walker wrote: > >> Yeah I've looked at that tutorial. It's very straightforward and I've >> tried it as it says with no luck. I've gotten everything else to work so i'm >> quite puzzled. It must have something to do with routing and url recognition >> is the only thing I can figure, as I believe the fb:board and fb:comments >> tag map based on the URL and the xid=value. >> >> >> On Thu, Sep 4, 2008 at 11:09 AM, David Clements wrote: >> >>> Not totally sure what your issues are but did you look at the comments >>> section on the facebooker tutorial. >>> >>> They appear to be working there, although in there simplest form. >>> >>> http://apps.new.facebook.com/facebooker_tutorial/fbml/comments >>> >>> I haven't tried the board yet though. >>> >>> >>> >>> Dave >>> >>> >>> On Thu, Sep 4, 2008 at 9:52 AM, Zhao Lu wrote: >>> >>>> Hmm that shouldn't be the case. I had to internally store the comments >>>> because I wanted to be able to search them. As far as discussion board >>>> goes, I'd really love to use the fbml rather than implementing it. >>>> >>>> Since I'm new to this whole rails thing, all I can think of is to look >>>> at the >>>> test cases (rails app should be well tested, right?). I found a bunch >>>> of tests under >>>> vendor/plugins/facebooker/test/. rails_integration_test.rb >>>> contains some test cases on comments and fb_board. I was hoping to >>>> figure >>>> out the usage of them by merely looking at the test case. I'm not sure >>>> if >>>> you've looked at those and if they're helpful to you. >>>> I figured if they aren't then it means the test coverage can be >>>> improved. So >>>> you (or facebooker users like us) could probably improve it by adding >>>> new test >>>> cases, which should also help with debugging our problems as well. >>>> >>>> Zhao >>>> >>>> On Thu, Sep 4, 2008 at 12:02 AM, Allen Walker >>>> wrote: >>>> > Sadly, to do comments I had to implement what you have done, which >>>> > theoretically is much harder than just using the built in facebook >>>> comments >>>> > tag. Now that I wish to use a discussion board, it really behooves me >>>> to >>>> > figure this out b/c a discussion board is much more advanced than just >>>> > comments. >>>> > >>>> > Zhao Lu wrote: >>>> >> >>>> >> you are ahead of me, again. >>>> >> >>>> >> On Wed, Sep 3, 2008 at 10:46 PM, Allen Walker >>>> wrote: >>>> >> >>>> >>> >>>> >>> Actually I'm not even doing that. You are internally storing you own >>>> >>> comments. >>>> >>> >>>> >>> I'm simply attempting to use facebooks built in servers to run my >>>> >>> dicussion >>>> >>> boards and comments via the and code. It >>>> should >>>> >>> be >>>> >>> rather trivial and for some reason it's not working. It must have >>>> >>> something >>>> >>> to do with how facebook is reading the URL and not correctly mapping >>>> it >>>> >>> to >>>> >>> the xid. >>>> >>> >>>> >>> Zhao Lu wrote: >>>> >>> >>>> >>>> >>>> >>>> I haven't tried fb_board but I did get fb_comment working. The >>>> >>>> instruction in the beta _book_ wasn't quite >>>> >>>> complete and I had to look at the source code for chapter 8 to get >>>> >>>> things working. I had the same problem >>>> >>>> with you (or at least I think it's the same problem). Basically I >>>> >>>> type some comment in the text area and click >>>> >>>> submit and nothing 'happens'. When I look into the database table >>>> the >>>> >>>> new comment is there so what I was >>>> >>>> missing was to pull the comments out from the table and display >>>> them. >>>> >>>> >>>> >>>> My code structure is pretty much the same as karate poke. I have >>>> this >>>> >>>> code snippet in my view: >>>> >>>> >>>> >>>> <% form_for Comment.new do %> >>>> >>>> Comment on gifts:
>>>> >>>> <%= text_area_tag :body %>
>>>> >>>> <%= hidden_field_tag :comment_receiver, @user.id %> >>>> >>>> <%= submit_tag 'Post' %> >>>> >>>> <% end %> >>>> >>>> >>>> >>>>
>>>> >>>> <%= render :partial=>"comments/comments" %> >>>> >>>>
>>>> >>>> >>>> >>>> I was missing the
...
portion before. Do you have that >>>> and >>>> >>>> the _comments.erb partial in place? >>>> >>>> >>>> >>>> Zhao >>>> >>>> >>>> >>>> On Wed, Sep 3, 2008 at 9:37 PM, Allen Walker >>>> wrote: >>>> >>>> >>>> >>>> >>>> >>>>> >>>> >>>>> It would sure be nice if these would work. >>>> >>>>> >>>> >>>>> I have the following in my home controller: >>>> >>>>> >>>> >>>>> <%= fb_board("golf_board1") %> >>>> >>>>> >>>> >>>>> it renders: >>>> >>>>> >>>> >>>>> >>>> >>>>> >>>> >>>>> The discussion board shows on my page, but when I click start new >>>> >>>>> topic, >>>> >>>>> it >>>> >>>>> reloads the previous URL (default callback) and continues to >>>> display >>>> >>>>> "Start >>>> >>>>> new topic". >>>> >>>>> >>>> >>>>> fb_comments does the same thing. >>>> >>>>> >>>> >>>>> >>>> >>>>> Btw my URL is this after clicking "start new topic" >>>> >>>>> >>>> >>>>> http://apps.new.facebook.com/myapp/?fbapp_ec=751 >>>> >>>>> >>>> >>>>> thanks >>>> >>>>> _______________________________________________ >>>> >>>>> >>>> >>>>> >>>> > >>>> > _______________________________________________ >>>> > Facebooker-talk mailing list >>>> > Facebooker-talk at rubyforge.org >>>> > http://rubyforge.org/mailman/listinfo/facebooker-talk >>>> > >>>> >>>> >>>> >>>> -- >>>> Zhao >>>> _______________________________________________ >>>> Facebooker-talk mailing list >>>> Facebooker-talk at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>> >>> >>> >> >> >> -- >> http://auswalk.blogspot.com >> > > -- http://auswalk.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From auswalk at gmail.com Thu Sep 4 13:23:05 2008 From: auswalk at gmail.com (Allen Walker) Date: Thu, 04 Sep 2008 12:23:05 -0500 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: References: <48BF6608.5020107@gmail.com> <48BF763C.5070706@gmail.com> <48BF880D.3050704@gmail.com> <971598f90809040953t79441d04vdd66034ccfda8885@mail.gmail.com> <971598f90809041000r5ea6fb8era1758996134b6491@mail.gmail.com> Message-ID: <48C01979.1070501@gmail.com> Well it has to somehow resolve ambiguities at least at an application level. Again for some reason this isn't working properly. Maybe someone else who's using these tags would chime in. David Clements wrote: > Yeah, I would think that it would do this. > > > > Dave > > On Thu, Sep 4, 2008 at 11:00 AM, Allen Walker > wrote: > > Hmm. well what if you used the same xid on different pages. I > wouldn't think it would pull in the comments from the other page > right? > > On Thu, Sep 4, 2008 at 11:56 AM, David Clements > > wrote: > > Not sure about that. I don't set the url in the tutorial at > all. Each lesson has it own comment block with just and xid. > > Dave > > > > On Thu, Sep 4, 2008 at 10:53 AM, Allen Walker > > wrote: > > Yeah I've looked at that tutorial. It's very > straightforward and I've tried it as it says with no luck. > I've gotten everything else to work so i'm quite puzzled. > It must have something to do with routing and url > recognition is the only thing I can figure, as I believe > the fb:board and fb:comments tag map based on the URL and > the xid=value. > > > On Thu, Sep 4, 2008 at 11:09 AM, David Clements > > wrote: > > Not totally sure what your issues are but did you look > at the comments section on the facebooker tutorial. > > They appear to be working there, although in there > simplest form. > > http://apps.new.facebook.com/facebooker_tutorial/fbml/comments > > I haven't tried the board yet though. > > > > Dave > > > On Thu, Sep 4, 2008 at 9:52 AM, Zhao Lu @gmail.com > wrote: > > Hmm that shouldn't be the case. I had to > internally store the comments > because I wanted to be able to search them. As > far as discussion board > goes, I'd really love to use the fbml rather than > implementing it. > > Since I'm new to this whole rails thing, all I can > think of is to look at the > test cases (rails app should be well tested, > right?). I found a bunch > of tests under > vendor/plugins/facebooker/test/. > rails_integration_test.rb > contains some test cases on comments and fb_board. > I was hoping to figure > out the usage of them by merely looking at the > test case. I'm not sure if > you've looked at those and if they're helpful to you. > I figured if they aren't then it means the test > coverage can be improved. So > you (or facebooker users like us) could probably > improve it by adding new test > cases, which should also help with debugging our > problems as well. > > Zhao > > On Thu, Sep 4, 2008 at 12:02 AM, Allen Walker > > wrote: > > Sadly, to do comments I had to implement what > you have done, which > > theoretically is much harder than just using the > built in facebook comments > > tag. Now that I wish to use a discussion board, > it really behooves me to > > figure this out b/c a discussion board is much > more advanced than just > > comments. > > > > Zhao Lu wrote: > >> > >> you are ahead of me, again. > >> > >> On Wed, Sep 3, 2008 at 10:46 PM, Allen Walker > > wrote: > >> > >>> > >>> Actually I'm not even doing that. You are > internally storing you own > >>> comments. > >>> > >>> I'm simply attempting to use facebooks built > in servers to run my > >>> dicussion > >>> boards and comments via the and > code. It should > >>> be > >>> rather trivial and for some reason it's not > working. It must have > >>> something > >>> to do with how facebook is reading the URL and > not correctly mapping it > >>> to > >>> the xid. > >>> > >>> Zhao Lu wrote: > >>> > >>>> > >>>> I haven't tried fb_board but I did get > fb_comment working. The > >>>> instruction in the beta _book_ wasn't quite > >>>> complete and I had to look at the source code > for chapter 8 to get > >>>> things working. I had the same problem > >>>> with you (or at least I think it's the same > problem). Basically I > >>>> type some comment in the text area and click > >>>> submit and nothing 'happens'. When I look > into the database table the > >>>> new comment is there so what I was > >>>> missing was to pull the comments out from the > table and display them. > >>>> > >>>> My code structure is pretty much the same as > karate poke. I have this > >>>> code snippet in my view: > >>>> > >>>> <% form_for Comment.new do %> > >>>> Comment on gifts:
> >>>> <%= text_area_tag :body %>
> >>>> <%= hidden_field_tag :comment_receiver, > @user.id %> > >>>> <%= submit_tag 'Post' %> > >>>> <% end %> > >>>> > >>>>
> >>>> <%= render :partial=>"comments/comments" %> > >>>>
> >>>> > >>>> I was missing the
...
portion > before. Do you have that and > >>>> the _comments.erb partial in place? > >>>> > >>>> Zhao > >>>> > >>>> On Wed, Sep 3, 2008 at 9:37 PM, Allen Walker > > wrote: > >>>> > >>>> > >>>>> > >>>>> It would sure be nice if these would work. > >>>>> > >>>>> I have the following in my home controller: > >>>>> > >>>>> <%= fb_board("golf_board1") %> > >>>>> > >>>>> it renders: > >>>>> > >>>>> > >>>>> > >>>>> The discussion board shows on my page, but > when I click start new > >>>>> topic, > >>>>> it > >>>>> reloads the previous URL (default callback) > and continues to display > >>>>> "Start > >>>>> new topic". > >>>>> > >>>>> fb_comments does the same thing. > >>>>> > >>>>> > >>>>> Btw my URL is this after clicking "start new > topic" > >>>>> > >>>>> http://apps.new.facebook.com/myapp/?fbapp_ec=751 > >>>>> > >>>>> thanks > >>>>> _______________________________________________ > >>>>> > >>>>> > > > > _______________________________________________ > > Facebooker-talk mailing list > > Facebooker-talk at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > -- > Zhao > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > -- > http://auswalk.blogspot.com > > > > > > -- > http://auswalk.blogspot.com > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > From mmangino at elevatedrails.com Thu Sep 4 17:11:20 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Thu, 4 Sep 2008 17:11:20 -0400 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: <48C01979.1070501@gmail.com> References: <48BF6608.5020107@gmail.com> <48BF763C.5070706@gmail.com> <48BF880D.3050704@gmail.com> <971598f90809040953t79441d04vdd66034ccfda8885@mail.gmail.com> <971598f90809041000r5ea6fb8era1758996134b6491@mail.gmail.com> <48C01979.1070501@gmail.com> Message-ID: <93B0BE49-446F-4A50-8C0D-AFD5689CC250@elevatedrails.com> Have you tried the absolute basics? Discuss the Titans and stick that on a static html page? If that works, try it with a rails page with a specific route to make sure all http methods can hit it. We're using the board tag with success. Mike On Sep 4, 2008, at 1:23 PM, Allen Walker wrote: > Well it has to somehow resolve ambiguities at least at an > application level. > > Again for some reason this isn't working properly. Maybe someone > else who's using these tags would chime in. > > David Clements wrote: >> Yeah, I would think that it would do this. >> >> >> Dave >> >> On Thu, Sep 4, 2008 at 11:00 AM, Allen Walker > >> wrote: >> >> Hmm. well what if you used the same xid on different pages. I >> wouldn't think it would pull in the comments from the other page >> right? >> >> On Thu, Sep 4, 2008 at 11:56 AM, David Clements >> > wrote: >> >> Not sure about that. I don't set the url in the tutorial at >> all. Each lesson has it own comment block with just and xid. >> >> Dave >> >> >> >> On Thu, Sep 4, 2008 at 10:53 AM, Allen Walker >> > wrote: >> >> Yeah I've looked at that tutorial. It's very >> straightforward and I've tried it as it says with no luck. >> I've gotten everything else to work so i'm quite puzzled. >> It must have something to do with routing and url >> recognition is the only thing I can figure, as I believe >> the fb:board and fb:comments tag map based on the URL and >> the xid=value. >> >> >> On Thu, Sep 4, 2008 at 11:09 AM, David Clements >> > wrote: >> >> Not totally sure what your issues are but did you look >> at the comments section on the facebooker tutorial. >> >> They appear to be working there, although in there >> simplest form. >> >> http://apps.new.facebook.com/facebooker_tutorial/fbml/comments >> >> I haven't tried the board yet though. >> >> >> >> Dave >> >> >> On Thu, Sep 4, 2008 at 9:52 AM, Zhao Lu > @gmail.com > >> wrote: >> >> Hmm that shouldn't be the case. I had to >> internally store the comments >> because I wanted to be able to search them. As >> far as discussion board >> goes, I'd really love to use the fbml rather than >> implementing it. >> >> Since I'm new to this whole rails thing, all I can >> think of is to look at the >> test cases (rails app should be well tested, >> right?). I found a bunch >> of tests under >> vendor/plugins/facebooker/test/. >> rails_integration_test.rb >> contains some test cases on comments and fb_board. >> I was hoping to figure >> out the usage of them by merely looking at the >> test case. I'm not sure if >> you've looked at those and if they're helpful to >> you. >> I figured if they aren't then it means the test >> coverage can be improved. So >> you (or facebooker users like us) could probably >> improve it by adding new test >> cases, which should also help with debugging our >> problems as well. >> >> Zhao >> >> On Thu, Sep 4, 2008 at 12:02 AM, Allen Walker >> > >> wrote: >> > Sadly, to do comments I had to implement what >> you have done, which >> > theoretically is much harder than just using the >> built in facebook comments >> > tag. Now that I wish to use a discussion board, >> it really behooves me to >> > figure this out b/c a discussion board is much >> more advanced than just >> > comments. >> > >> > Zhao Lu wrote: >> >> >> >> you are ahead of me, again. >> >> >> >> On Wed, Sep 3, 2008 at 10:46 PM, Allen Walker >> > >> wrote: >> >> >> >>> >> >>> Actually I'm not even doing that. You are >> internally storing you own >> >>> comments. >> >>> >> >>> I'm simply attempting to use facebooks built >> in servers to run my >> >>> dicussion >> >>> boards and comments via the and >> code. It should >> >>> be >> >>> rather trivial and for some reason it's not >> working. It must have >> >>> something >> >>> to do with how facebook is reading the URL and >> not correctly mapping it >> >>> to >> >>> the xid. >> >>> >> >>> Zhao Lu wrote: >> >>> >> >>>> >> >>>> I haven't tried fb_board but I did get >> fb_comment working. The >> >>>> instruction in the beta _book_ wasn't quite >> >>>> complete and I had to look at the source code >> for chapter 8 to get >> >>>> things working. I had the same problem >> >>>> with you (or at least I think it's the same >> problem). Basically I >> >>>> type some comment in the text area and click >> >>>> submit and nothing 'happens'. When I look >> into the database table the >> >>>> new comment is there so what I was >> >>>> missing was to pull the comments out from the >> table and display them. >> >>>> >> >>>> My code structure is pretty much the same as >> karate poke. I have this >> >>>> code snippet in my view: >> >>>> >> >>>> <% form_for Comment.new do %> >> >>>> Comment on gifts:
>> >>>> <%= text_area_tag :body %>
>> >>>> <%= hidden_field_tag :comment_receiver, >> @user.id %> >> >>>> <%= submit_tag 'Post' %> >> >>>> <% end %> >> >>>> >> >>>>
>> >>>> <%= render :partial=>"comments/comments" %> >> >>>>
>> >>>> >> >>>> I was missing the
...
portion >> before. Do you have that and >> >>>> the _comments.erb partial in place? >> >>>> >> >>>> Zhao >> >>>> >> >>>> On Wed, Sep 3, 2008 at 9:37 PM, Allen Walker >> > >> wrote: >> >>>> >> >>>> >> >>>>> >> >>>>> It would sure be nice if these would work. >> >>>>> >> >>>>> I have the following in my home controller: >> >>>>> >> >>>>> <%= fb_board("golf_board1") %> >> >>>>> >> >>>>> it renders: >> >>>>> >> >>>>> >> >>>>> >> >>>>> The discussion board shows on my page, but >> when I click start new >> >>>>> topic, >> >>>>> it >> >>>>> reloads the previous URL (default callback) >> and continues to display >> >>>>> "Start >> >>>>> new topic". >> >>>>> >> >>>>> fb_comments does the same thing. >> >>>>> >> >>>>> >> >>>>> Btw my URL is this after clicking "start new >> topic" >> >>>>> >> >>>>> http://apps.new.facebook.com/myapp/?fbapp_ec=751 >> >>>>> >> >>>>> thanks >> >>>>> >> _______________________________________________ >> >>>>> >> >>>>> >> > >> > _______________________________________________ >> > Facebooker-talk mailing list >> > Facebooker-talk at rubyforge.org >> >> > >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > >> >> >> >> -- >> Zhao >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> >> >> >> >> -- http://auswalk.blogspot.com >> >> >> >> >> >> -- http://auswalk.blogspot.com >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org > > >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From auswalk at gmail.com Thu Sep 4 17:19:45 2008 From: auswalk at gmail.com (Allen Walker) Date: Thu, 04 Sep 2008 16:19:45 -0500 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: <93B0BE49-446F-4A50-8C0D-AFD5689CC250@elevatedrails.com> References: <48BF6608.5020107@gmail.com> <48BF763C.5070706@gmail.com> <48BF880D.3050704@gmail.com> <971598f90809040953t79441d04vdd66034ccfda8885@mail.gmail.com> <971598f90809041000r5ea6fb8era1758996134b6491@mail.gmail.com> <48C01979.1070501@gmail.com> <93B0BE49-446F-4A50-8C0D-AFD5689CC250@elevatedrails.com> Message-ID: <48C050F1.7030209@gmail.com> Tried that tag specifically. Couldn't get it to work. Same deal. The discussion board comes up but when I enter a topic and data and click POST, nothing is populated. I have to believe the HTTP POST is not being routed correctly and therefore the POST data is lost. I think therefore my routing is not setup correctly to handle this. Please note fb:board is being used on the "home" controller view .. i.e. apps.facebook.com/myapp/home in app/views/home/index.fbml.erb Here's my routes.rb: ActionController::Routing::Routes.draw do |map| # The priority is based upon order of creation: first created -> highest priority. # Sample of regular route: # map.connect 'products/:id', :controller => 'catalog', :action => 'view' # Keep in mind you can assign values other than :controller and :action # Sample of named route: # map.purchase 'products/:id/purchase', :controller => 'catalog', :action => 'purchase' # This route can be invoked with purchase_url(:id => product.id) # Sample resource route (maps HTTP verbs to controller actions automatically): # map.resources :products # Sample resource route with options: # map.resources :products, :member => { :short => :get, :toggle => :post }, :collection => { :sold => :get } # Sample resource route with sub-resources: # map.resources :products, :has_many => [ :comments, :sales ], :has_one => :seller # Sample resource route with more complex sub-resources # map.resources :products do |products| # products.resources :comments # products.resources :sales, :collection => { :recent => :get } # end # Sample resource route within a namespace: # map.namespace :admin do |admin| # # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb) # admin.resources :products # end # You can have the root of your site routed with map.root -- just remember to delete public/index.html. # map.root :controller => "welcome" # See how all your routes lay out with "rake routes" map.resources :invitations map.resources :sports map.resources :home # map.root :controller=>"home", :action=>"index" # Install the default routes as the lowest priority. map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format' end Mike Mangino wrote: > Have you tried the absolute basics? > > canmark="false" cancreatetopic="true" numtopics="5" > returnurl="http://apps.facebook.com/myapp/titans/"> Discuss > the Titans > > and stick that on a static html page? > > If that works, try it with a rails page with a specific route to make > sure all http methods can hit it. > > We're using the board tag with success. > > Mike > > On Sep 4, 2008, at 1:23 PM, Allen Walker wrote: > >> Well it has to somehow resolve ambiguities at least at an application >> level. >> >> Again for some reason this isn't working properly. Maybe someone else >> who's using these tags would chime in. >> >> David Clements wrote: >>> Yeah, I would think that it would do this. >>> >>> >>> Dave >>> >>> On Thu, Sep 4, 2008 at 11:00 AM, Allen Walker >> > wrote: >>> >>> Hmm. well what if you used the same xid on different pages. I >>> wouldn't think it would pull in the comments from the other page >>> right? >>> >>> On Thu, Sep 4, 2008 at 11:56 AM, David Clements >>> > wrote: >>> >>> Not sure about that. I don't set the url in the tutorial at >>> all. Each lesson has it own comment block with just and xid. >>> >>> Dave >>> >>> >>> >>> On Thu, Sep 4, 2008 at 10:53 AM, Allen Walker >>> > wrote: >>> >>> Yeah I've looked at that tutorial. It's very >>> straightforward and I've tried it as it says with no luck. >>> I've gotten everything else to work so i'm quite puzzled. >>> It must have something to do with routing and url >>> recognition is the only thing I can figure, as I believe >>> the fb:board and fb:comments tag map based on the URL and >>> the xid=value. >>> >>> >>> On Thu, Sep 4, 2008 at 11:09 AM, David Clements >>> > wrote: >>> >>> Not totally sure what your issues are but did you look >>> at the comments section on the facebooker tutorial. >>> >>> They appear to be working there, although in there >>> simplest form. >>> >>> >>> http://apps.new.facebook.com/facebooker_tutorial/fbml/comments >>> >>> I haven't tried the board yet though. >>> >>> >>> >>> Dave >>> >>> >>> On Thu, Sep 4, 2008 at 9:52 AM, Zhao Lu >> @gmail.com > wrote: >>> >>> Hmm that shouldn't be the case. I had to >>> internally store the comments >>> because I wanted to be able to search them. As >>> far as discussion board >>> goes, I'd really love to use the fbml rather than >>> implementing it. >>> >>> Since I'm new to this whole rails thing, all I can >>> think of is to look at the >>> test cases (rails app should be well tested, >>> right?). I found a bunch >>> of tests under >>> vendor/plugins/facebooker/test/. >>> rails_integration_test.rb >>> contains some test cases on comments and fb_board. >>> I was hoping to figure >>> out the usage of them by merely looking at the >>> test case. I'm not sure if >>> you've looked at those and if they're helpful to >>> you. >>> I figured if they aren't then it means the test >>> coverage can be improved. So >>> you (or facebooker users like us) could probably >>> improve it by adding new test >>> cases, which should also help with debugging our >>> problems as well. >>> >>> Zhao >>> >>> On Thu, Sep 4, 2008 at 12:02 AM, Allen Walker >>> > >>> wrote: >>> > Sadly, to do comments I had to implement what >>> you have done, which >>> > theoretically is much harder than just using the >>> built in facebook comments >>> > tag. Now that I wish to use a discussion board, >>> it really behooves me to >>> > figure this out b/c a discussion board is much >>> more advanced than just >>> > comments. >>> > >>> > Zhao Lu wrote: >>> >> >>> >> you are ahead of me, again. >>> >> >>> >> On Wed, Sep 3, 2008 at 10:46 PM, Allen Walker >>> > >>> wrote: >>> >> >>> >>> >>> >>> Actually I'm not even doing that. You are >>> internally storing you own >>> >>> comments. >>> >>> >>> >>> I'm simply attempting to use facebooks built >>> in servers to run my >>> >>> dicussion >>> >>> boards and comments via the and >>> code. It should >>> >>> be >>> >>> rather trivial and for some reason it's not >>> working. It must have >>> >>> something >>> >>> to do with how facebook is reading the URL and >>> not correctly mapping it >>> >>> to >>> >>> the xid. >>> >>> >>> >>> Zhao Lu wrote: >>> >>> >>> >>>> >>> >>>> I haven't tried fb_board but I did get >>> fb_comment working. The >>> >>>> instruction in the beta _book_ wasn't quite >>> >>>> complete and I had to look at the source code >>> for chapter 8 to get >>> >>>> things working. I had the same problem >>> >>>> with you (or at least I think it's the same >>> problem). Basically I >>> >>>> type some comment in the text area and click >>> >>>> submit and nothing 'happens'. When I look >>> into the database table the >>> >>>> new comment is there so what I was >>> >>>> missing was to pull the comments out from the >>> table and display them. >>> >>>> >>> >>>> My code structure is pretty much the same as >>> karate poke. I have this >>> >>>> code snippet in my view: >>> >>>> >>> >>>> <% form_for Comment.new do %> >>> >>>> Comment on gifts:
>>> >>>> <%= text_area_tag :body %>
>>> >>>> <%= hidden_field_tag :comment_receiver, >>> @user.id %> >>> >>>> <%= submit_tag 'Post' %> >>> >>>> <% end %> >>> >>>> >>> >>>>
>>> >>>> <%= render :partial=>"comments/comments" %> >>> >>>>
>>> >>>> >>> >>>> I was missing the
...
portion >>> before. Do you have that and >>> >>>> the _comments.erb partial in place? >>> >>>> >>> >>>> Zhao >>> >>>> >>> >>>> On Wed, Sep 3, 2008 at 9:37 PM, Allen Walker >>> > >>> wrote: >>> >>>> >>> >>>> >>> >>>>> >>> >>>>> It would sure be nice if these would work. >>> >>>>> >>> >>>>> I have the following in my home controller: >>> >>>>> >>> >>>>> <%= fb_board("golf_board1") %> >>> >>>>> >>> >>>>> it renders: >>> >>>>> >>> >>>>> >>> >>>>> >>> >>>>> The discussion board shows on my page, but >>> when I click start new >>> >>>>> topic, >>> >>>>> it >>> >>>>> reloads the previous URL (default callback) >>> and continues to display >>> >>>>> "Start >>> >>>>> new topic". >>> >>>>> >>> >>>>> fb_comments does the same thing. >>> >>>>> >>> >>>>> >>> >>>>> Btw my URL is this after clicking "start new >>> topic" >>> >>>>> >>> >>>>> >>> http://apps.new.facebook.com/myapp/?fbapp_ec=751 >>> >>>>> >>> >>>>> thanks >>> >>>>> >>> _______________________________________________ >>> >>>>> >>> >>>>> >>> > >>> > _______________________________________________ >>> > Facebooker-talk mailing list >>> > Facebooker-talk at rubyforge.org >>> >>> > >>> >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> > >>> >>> >>> >>> -- >>> Zhao >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> >>> >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >>> >>> >>> >>> >>> -- http://auswalk.blogspot.com >>> >>> >>> >>> >>> >>> -- http://auswalk.blogspot.com >>> >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >>> >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com > > > > From auswalk at gmail.com Thu Sep 4 17:28:33 2008 From: auswalk at gmail.com (Allen Walker) Date: Thu, 04 Sep 2008 16:28:33 -0500 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: <93B0BE49-446F-4A50-8C0D-AFD5689CC250@elevatedrails.com> References: <48BF6608.5020107@gmail.com> <48BF763C.5070706@gmail.com> <48BF880D.3050704@gmail.com> <971598f90809040953t79441d04vdd66034ccfda8885@mail.gmail.com> <971598f90809041000r5ea6fb8era1758996134b6491@mail.gmail.com> <48C01979.1070501@gmail.com> <93B0BE49-446F-4A50-8C0D-AFD5689CC250@elevatedrails.com> Message-ID: <48C05301.7080206@gmail.com> Interesting. I was able to get the fb:board to work properly when added a "new" action to my home controller. Then I created new.fbml.erb: Discuss the Titans Went to http://apps.new.facebook.com/myapp/home/new Created a topic, hit post and it saved it. Then on my home page the saved topic now appears in the list, but once again if I try to create a new topic from this page , nothing is populated. It only works when I go to http://apps.new.facebook.com/myapp/home/new and then create and post of topic from that page Bizarre. Any ideas Mike Mangino wrote: > Have you tried the absolute basics? > > canmark="false" cancreatetopic="true" numtopics="5" > returnurl="http://apps.facebook.com/myapp/titans/"> Discuss > the Titans > > and stick that on a static html page? > > If that works, try it with a rails page with a specific route to make > sure all http methods can hit it. > > We're using the board tag with success. > > Mike > > On Sep 4, 2008, at 1:23 PM, Allen Walker wrote: > >> Well it has to somehow resolve ambiguities at least at an application >> level. >> >> Again for some reason this isn't working properly. Maybe someone else >> who's using these tags would chime in. >> >> David Clements wrote: >>> Yeah, I would think that it would do this. >>> >>> >>> Dave >>> >>> On Thu, Sep 4, 2008 at 11:00 AM, Allen Walker >> > wrote: >>> >>> Hmm. well what if you used the same xid on different pages. I >>> wouldn't think it would pull in the comments from the other page >>> right? >>> >>> On Thu, Sep 4, 2008 at 11:56 AM, David Clements >>> > wrote: >>> >>> Not sure about that. I don't set the url in the tutorial at >>> all. Each lesson has it own comment block with just and xid. >>> >>> Dave >>> >>> >>> >>> On Thu, Sep 4, 2008 at 10:53 AM, Allen Walker >>> > wrote: >>> >>> Yeah I've looked at that tutorial. It's very >>> straightforward and I've tried it as it says with no luck. >>> I've gotten everything else to work so i'm quite puzzled. >>> It must have something to do with routing and url >>> recognition is the only thing I can figure, as I believe >>> the fb:board and fb:comments tag map based on the URL and >>> the xid=value. >>> >>> >>> On Thu, Sep 4, 2008 at 11:09 AM, David Clements >>> > wrote: >>> >>> Not totally sure what your issues are but did you look >>> at the comments section on the facebooker tutorial. >>> >>> They appear to be working there, although in there >>> simplest form. >>> >>> >>> http://apps.new.facebook.com/facebooker_tutorial/fbml/comments >>> >>> I haven't tried the board yet though. >>> >>> >>> >>> Dave >>> >>> >>> On Thu, Sep 4, 2008 at 9:52 AM, Zhao Lu >> @gmail.com > wrote: >>> >>> Hmm that shouldn't be the case. I had to >>> internally store the comments >>> because I wanted to be able to search them. As >>> far as discussion board >>> goes, I'd really love to use the fbml rather than >>> implementing it. >>> >>> Since I'm new to this whole rails thing, all I can >>> think of is to look at the >>> test cases (rails app should be well tested, >>> right?). I found a bunch >>> of tests under >>> vendor/plugins/facebooker/test/. >>> rails_integration_test.rb >>> contains some test cases on comments and fb_board. >>> I was hoping to figure >>> out the usage of them by merely looking at the >>> test case. I'm not sure if >>> you've looked at those and if they're helpful to >>> you. >>> I figured if they aren't then it means the test >>> coverage can be improved. So >>> you (or facebooker users like us) could probably >>> improve it by adding new test >>> cases, which should also help with debugging our >>> problems as well. >>> >>> Zhao >>> >>> On Thu, Sep 4, 2008 at 12:02 AM, Allen Walker >>> > >>> wrote: >>> > Sadly, to do comments I had to implement what >>> you have done, which >>> > theoretically is much harder than just using the >>> built in facebook comments >>> > tag. Now that I wish to use a discussion board, >>> it really behooves me to >>> > figure this out b/c a discussion board is much >>> more advanced than just >>> > comments. >>> > >>> > Zhao Lu wrote: >>> >> >>> >> you are ahead of me, again. >>> >> >>> >> On Wed, Sep 3, 2008 at 10:46 PM, Allen Walker >>> > >>> wrote: >>> >> >>> >>> >>> >>> Actually I'm not even doing that. You are >>> internally storing you own >>> >>> comments. >>> >>> >>> >>> I'm simply attempting to use facebooks built >>> in servers to run my >>> >>> dicussion >>> >>> boards and comments via the and >>> code. It should >>> >>> be >>> >>> rather trivial and for some reason it's not >>> working. It must have >>> >>> something >>> >>> to do with how facebook is reading the URL and >>> not correctly mapping it >>> >>> to >>> >>> the xid. >>> >>> >>> >>> Zhao Lu wrote: >>> >>> >>> >>>> >>> >>>> I haven't tried fb_board but I did get >>> fb_comment working. The >>> >>>> instruction in the beta _book_ wasn't quite >>> >>>> complete and I had to look at the source code >>> for chapter 8 to get >>> >>>> things working. I had the same problem >>> >>>> with you (or at least I think it's the same >>> problem). Basically I >>> >>>> type some comment in the text area and click >>> >>>> submit and nothing 'happens'. When I look >>> into the database table the >>> >>>> new comment is there so what I was >>> >>>> missing was to pull the comments out from the >>> table and display them. >>> >>>> >>> >>>> My code structure is pretty much the same as >>> karate poke. I have this >>> >>>> code snippet in my view: >>> >>>> >>> >>>> <% form_for Comment.new do %> >>> >>>> Comment on gifts:
>>> >>>> <%= text_area_tag :body %>
>>> >>>> <%= hidden_field_tag :comment_receiver, >>> @user.id %> >>> >>>> <%= submit_tag 'Post' %> >>> >>>> <% end %> >>> >>>> >>> >>>>
>>> >>>> <%= render :partial=>"comments/comments" %> >>> >>>>
>>> >>>> >>> >>>> I was missing the
...
portion >>> before. Do you have that and >>> >>>> the _comments.erb partial in place? >>> >>>> >>> >>>> Zhao >>> >>>> >>> >>>> On Wed, Sep 3, 2008 at 9:37 PM, Allen Walker >>> > >>> wrote: >>> >>>> >>> >>>> >>> >>>>> >>> >>>>> It would sure be nice if these would work. >>> >>>>> >>> >>>>> I have the following in my home controller: >>> >>>>> >>> >>>>> <%= fb_board("golf_board1") %> >>> >>>>> >>> >>>>> it renders: >>> >>>>> >>> >>>>> >>> >>>>> >>> >>>>> The discussion board shows on my page, but >>> when I click start new >>> >>>>> topic, >>> >>>>> it >>> >>>>> reloads the previous URL (default callback) >>> and continues to display >>> >>>>> "Start >>> >>>>> new topic". >>> >>>>> >>> >>>>> fb_comments does the same thing. >>> >>>>> >>> >>>>> >>> >>>>> Btw my URL is this after clicking "start new >>> topic" >>> >>>>> >>> >>>>> >>> http://apps.new.facebook.com/myapp/?fbapp_ec=751 >>> >>>>> >>> >>>>> thanks >>> >>>>> >>> _______________________________________________ >>> >>>>> >>> >>>>> >>> > >>> > _______________________________________________ >>> > Facebooker-talk mailing list >>> > Facebooker-talk at rubyforge.org >>> >>> > >>> >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> > >>> >>> >>> >>> -- >>> Zhao >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> >>> >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >>> >>> >>> >>> >>> -- http://auswalk.blogspot.com >>> >>> >>> >>> >>> >>> -- http://auswalk.blogspot.com >>> >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >>> >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com > > > > From mmangino at elevatedrails.com Thu Sep 4 17:47:43 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Thu, 4 Sep 2008 17:47:43 -0400 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: <48C05301.7080206@gmail.com> References: <48BF6608.5020107@gmail.com> <48BF763C.5070706@gmail.com> <48BF880D.3050704@gmail.com> <971598f90809040953t79441d04vdd66034ccfda8885@mail.gmail.com> <971598f90809041000r5ea6fb8era1758996134b6491@mail.gmail.com> <48C01979.1070501@gmail.com> <93B0BE49-446F-4A50-8C0D-AFD5689CC250@elevatedrails.com> <48C05301.7080206@gmail.com> Message-ID: Try creating a route just for that page, i.e. route.discussion_board 'discussion', :controller=>"home", :action=>"index" Then, go to http://apps.new.facebook.com/myapp/discussion and see if that works. I struggled like mad to get this to work the first time too. I wish I could remember the eventual fix. Mike On Sep 4, 2008, at 5:28 PM, Allen Walker wrote: > Interesting. I was able to get the fb:board to work properly when > added a "new" action to my home controller. Then I created > new.fbml.erb: > > canmark="false" cancreatetopic="true" numtopics="5" returnurl="http://apps.facebook.com/myapp/home/ > "> Discuss the Titans > > Went to http://apps.new.facebook.com/myapp/home/new > > Created a topic, hit post and it saved it. > > Then on my home page the saved topic now appears in the list, but > once again if I try to create a new topic from this page , nothing > is populated. It only works when I go to http://apps.new.facebook.com/myapp/home/new > and then create and post of topic from that page > > Bizarre. Any ideas > > Mike Mangino wrote: >> Have you tried the absolute basics? >> >> > canmark="false" cancreatetopic="true" numtopics="5" returnurl="http://apps.facebook.com/myapp/titans/ >> "> Discuss the Titans >> >> and stick that on a static html page? >> >> If that works, try it with a rails page with a specific route to >> make sure all http methods can hit it. >> >> We're using the board tag with success. >> >> Mike >> >> On Sep 4, 2008, at 1:23 PM, Allen Walker wrote: >> >>> Well it has to somehow resolve ambiguities at least at an >>> application level. >>> >>> Again for some reason this isn't working properly. Maybe someone >>> else who's using these tags would chime in. >>> >>> David Clements wrote: >>>> Yeah, I would think that it would do this. >>>> >>>> >>>> Dave >>>> >>>> On Thu, Sep 4, 2008 at 11:00 AM, Allen Walker >>> >> wrote: >>>> >>>> Hmm. well what if you used the same xid on different pages. I >>>> wouldn't think it would pull in the comments from the other page >>>> right? >>>> >>>> On Thu, Sep 4, 2008 at 11:56 AM, David Clements >>>> > wrote: >>>> >>>> Not sure about that. I don't set the url in the tutorial at >>>> all. Each lesson has it own comment block with just and xid. >>>> >>>> Dave >>>> >>>> >>>> >>>> On Thu, Sep 4, 2008 at 10:53 AM, Allen Walker >>>> > wrote: >>>> >>>> Yeah I've looked at that tutorial. It's very >>>> straightforward and I've tried it as it says with no >>>> luck. >>>> I've gotten everything else to work so i'm quite puzzled. >>>> It must have something to do with routing and url >>>> recognition is the only thing I can figure, as I believe >>>> the fb:board and fb:comments tag map based on the URL and >>>> the xid=value. >>>> >>>> >>>> On Thu, Sep 4, 2008 at 11:09 AM, David Clements >>>> > wrote: >>>> >>>> Not totally sure what your issues are but did you >>>> look >>>> at the comments section on the facebooker tutorial. >>>> >>>> They appear to be working there, although in there >>>> simplest form. >>>> >>>> http://apps.new.facebook.com/facebooker_tutorial/fbml/comments >>>> >>>> I haven't tried the board yet though. >>>> >>>> >>>> >>>> Dave >>>> >>>> >>>> On Thu, Sep 4, 2008 at 9:52 AM, Zhao Lu >>> @gmail.com > >>>> wrote: >>>> >>>> Hmm that shouldn't be the case. I had to >>>> internally store the comments >>>> because I wanted to be able to search them. As >>>> far as discussion board >>>> goes, I'd really love to use the fbml rather than >>>> implementing it. >>>> >>>> Since I'm new to this whole rails thing, all I >>>> can >>>> think of is to look at the >>>> test cases (rails app should be well tested, >>>> right?). I found a bunch >>>> of tests under >>>> vendor/plugins/facebooker/test/. >>>> rails_integration_test.rb >>>> contains some test cases on comments and >>>> fb_board. >>>> I was hoping to figure >>>> out the usage of them by merely looking at the >>>> test case. I'm not sure if >>>> you've looked at those and if they're helpful >>>> to you. >>>> I figured if they aren't then it means the test >>>> coverage can be improved. So >>>> you (or facebooker users like us) could probably >>>> improve it by adding new test >>>> cases, which should also help with debugging our >>>> problems as well. >>>> >>>> Zhao >>>> >>>> On Thu, Sep 4, 2008 at 12:02 AM, Allen Walker >>>> > >>>> wrote: >>>> > Sadly, to do comments I had to implement what >>>> you have done, which >>>> > theoretically is much harder than just using >>>> the >>>> built in facebook comments >>>> > tag. Now that I wish to use a discussion board, >>>> it really behooves me to >>>> > figure this out b/c a discussion board is much >>>> more advanced than just >>>> > comments. >>>> > >>>> > Zhao Lu wrote: >>>> >> >>>> >> you are ahead of me, again. >>>> >> >>>> >> On Wed, Sep 3, 2008 at 10:46 PM, Allen Walker >>>> > >>>> wrote: >>>> >> >>>> >>> >>>> >>> Actually I'm not even doing that. You are >>>> internally storing you own >>>> >>> comments. >>>> >>> >>>> >>> I'm simply attempting to use facebooks built >>>> in servers to run my >>>> >>> dicussion >>>> >>> boards and comments via the and >>>> code. It should >>>> >>> be >>>> >>> rather trivial and for some reason it's not >>>> working. It must have >>>> >>> something >>>> >>> to do with how facebook is reading the URL >>>> and >>>> not correctly mapping it >>>> >>> to >>>> >>> the xid. >>>> >>> >>>> >>> Zhao Lu wrote: >>>> >>> >>>> >>>> >>>> >>>> I haven't tried fb_board but I did get >>>> fb_comment working. The >>>> >>>> instruction in the beta _book_ wasn't quite >>>> >>>> complete and I had to look at the source >>>> code >>>> for chapter 8 to get >>>> >>>> things working. I had the same problem >>>> >>>> with you (or at least I think it's the same >>>> problem). Basically I >>>> >>>> type some comment in the text area and click >>>> >>>> submit and nothing 'happens'. When I look >>>> into the database table the >>>> >>>> new comment is there so what I was >>>> >>>> missing was to pull the comments out from >>>> the >>>> table and display them. >>>> >>>> >>>> >>>> My code structure is pretty much the same as >>>> karate poke. I have this >>>> >>>> code snippet in my view: >>>> >>>> >>>> >>>> <% form_for Comment.new do %> >>>> >>>> Comment on gifts:
>>>> >>>> <%= text_area_tag :body %>
>>>> >>>> <%= hidden_field_tag :comment_receiver, >>>> @user.id %> >>>> >>>> <%= submit_tag 'Post' %> >>>> >>>> <% end %> >>>> >>>> >>>> >>>>
>>>> >>>> <%= render :partial=>"comments/comments" %> >>>> >>>>
>>>> >>>> >>>> >>>> I was missing the
...
portion >>>> before. Do you have that and >>>> >>>> the _comments.erb partial in place? >>>> >>>> >>>> >>>> Zhao >>>> >>>> >>>> >>>> On Wed, Sep 3, 2008 at 9:37 PM, Allen Walker >>>> > >>>> wrote: >>>> >>>> >>>> >>>> >>>> >>>>> >>>> >>>>> It would sure be nice if these would work. >>>> >>>>> >>>> >>>>> I have the following in my home controller: >>>> >>>>> >>>> >>>>> <%= fb_board("golf_board1") %> >>>> >>>>> >>>> >>>>> it renders: >>>> >>>>> >>>> >>>>> >>>> >>>>> >>>> >>>>> The discussion board shows on my page, but >>>> when I click start new >>>> >>>>> topic, >>>> >>>>> it >>>> >>>>> reloads the previous URL (default callback) >>>> and continues to display >>>> >>>>> "Start >>>> >>>>> new topic". >>>> >>>>> >>>> >>>>> fb_comments does the same thing. >>>> >>>>> >>>> >>>>> >>>> >>>>> Btw my URL is this after clicking "start >>>> new >>>> topic" >>>> >>>>> >>>> >>>>> http://apps.new.facebook.com/myapp/?fbapp_ec=751 >>>> >>>>> >>>> >>>>> thanks >>>> >>>>> >>>> _______________________________________________ >>>> >>>>> >>>> >>>>> >>>> > >>>> > _______________________________________________ >>>> > Facebooker-talk mailing list >>>> > Facebooker-talk at rubyforge.org >>>> >>>> > >>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>> > >>>> >>>> >>>> >>>> -- >>>> Zhao >>>> _______________________________________________ >>>> Facebooker-talk mailing list >>>> Facebooker-talk at rubyforge.org >>>> >>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>> >>>> >>>> >>>> >>>> >>>> -- http://auswalk.blogspot.com >>>> >>>> >>>> >>>> >>>> >>>> -- http://auswalk.blogspot.com >>>> >>>> _______________________________________________ >>>> Facebooker-talk mailing list >>>> Facebooker-talk at rubyforge.org >>> > >>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>> >>>> >>> >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> -- >> Mike Mangino >> http://www.elevatedrails.com >> >> >> >> > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From auswalk at gmail.com Thu Sep 4 17:56:17 2008 From: auswalk at gmail.com (Allen Walker) Date: Thu, 04 Sep 2008 16:56:17 -0500 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: References: <48BF6608.5020107@gmail.com> <48BF763C.5070706@gmail.com> <48BF880D.3050704@gmail.com> <971598f90809040953t79441d04vdd66034ccfda8885@mail.gmail.com> <971598f90809041000r5ea6fb8era1758996134b6491@mail.gmail.com> <48C01979.1070501@gmail.com> <93B0BE49-446F-4A50-8C0D-AFD5689CC250@elevatedrails.com> <48C05301.7080206@gmail.com> Message-ID: <48C05981.5040303@gmail.com> That worked! Man I am confused on this routing stuff and I'm really lost as to why this works and it doesn't work the default way. Mike Mangino wrote: > Try creating a route just for that page, i.e. > > route.discussion_board 'discussion', :controller=>"home", > :action=>"index" > > Then, go to http://apps.new.facebook.com/myapp/discussion and see if > that works. > > I struggled like mad to get this to work the first time too. I wish I > could remember the eventual fix. > > Mike > > On Sep 4, 2008, at 5:28 PM, Allen Walker wrote: > >> Interesting. I was able to get the fb:board to work properly when >> added a "new" action to my home controller. Then I created new.fbml.erb: >> >> > canmark="false" cancreatetopic="true" numtopics="5" >> returnurl="http://apps.facebook.com/myapp/home/"> Discuss >> the Titans >> >> Went to http://apps.new.facebook.com/myapp/home/new >> >> Created a topic, hit post and it saved it. >> >> Then on my home page the saved topic now appears in the list, but >> once again if I try to create a new topic from this page , nothing is >> populated. It only works when I go to >> http://apps.new.facebook.com/myapp/home/new and then create and post >> of topic from that page >> >> Bizarre. Any ideas >> >> Mike Mangino wrote: >>> Have you tried the absolute basics? >>> >>> >> canmark="false" cancreatetopic="true" numtopics="5" >>> returnurl="http://apps.facebook.com/myapp/titans/"> >>> Discuss the Titans >>> >>> and stick that on a static html page? >>> >>> If that works, try it with a rails page with a specific route to >>> make sure all http methods can hit it. >>> >>> We're using the board tag with success. >>> >>> Mike >>> >>> On Sep 4, 2008, at 1:23 PM, Allen Walker wrote: >>> >>>> Well it has to somehow resolve ambiguities at least at an >>>> application level. >>>> >>>> Again for some reason this isn't working properly. Maybe someone >>>> else who's using these tags would chime in. >>>> >>>> David Clements wrote: >>>>> Yeah, I would think that it would do this. >>>>> >>>>> >>>>> Dave >>>>> >>>>> On Thu, Sep 4, 2008 at 11:00 AM, Allen Walker >>>> > wrote: >>>>> >>>>> Hmm. well what if you used the same xid on different pages. I >>>>> wouldn't think it would pull in the comments from the other page >>>>> right? >>>>> >>>>> On Thu, Sep 4, 2008 at 11:56 AM, David Clements >>>>> > wrote: >>>>> >>>>> Not sure about that. I don't set the url in the tutorial at >>>>> all. Each lesson has it own comment block with just and xid. >>>>> >>>>> Dave >>>>> >>>>> >>>>> >>>>> On Thu, Sep 4, 2008 at 10:53 AM, Allen Walker >>>>> > wrote: >>>>> >>>>> Yeah I've looked at that tutorial. It's very >>>>> straightforward and I've tried it as it says with no luck. >>>>> I've gotten everything else to work so i'm quite puzzled. >>>>> It must have something to do with routing and url >>>>> recognition is the only thing I can figure, as I believe >>>>> the fb:board and fb:comments tag map based on the URL and >>>>> the xid=value. >>>>> >>>>> >>>>> On Thu, Sep 4, 2008 at 11:09 AM, David Clements >>>>> > wrote: >>>>> >>>>> Not totally sure what your issues are but did you look >>>>> at the comments section on the facebooker tutorial. >>>>> >>>>> They appear to be working there, although in there >>>>> simplest form. >>>>> >>>>> >>>>> http://apps.new.facebook.com/facebooker_tutorial/fbml/comments >>>>> >>>>> I haven't tried the board yet though. >>>>> >>>>> >>>>> >>>>> Dave >>>>> >>>>> >>>>> On Thu, Sep 4, 2008 at 9:52 AM, Zhao Lu >>>> @gmail.com > >>>>> wrote: >>>>> >>>>> Hmm that shouldn't be the case. I had to >>>>> internally store the comments >>>>> because I wanted to be able to search them. As >>>>> far as discussion board >>>>> goes, I'd really love to use the fbml rather than >>>>> implementing it. >>>>> >>>>> Since I'm new to this whole rails thing, all I can >>>>> think of is to look at the >>>>> test cases (rails app should be well tested, >>>>> right?). I found a bunch >>>>> of tests under >>>>> vendor/plugins/facebooker/test/. >>>>> rails_integration_test.rb >>>>> contains some test cases on comments and fb_board. >>>>> I was hoping to figure >>>>> out the usage of them by merely looking at the >>>>> test case. I'm not sure if >>>>> you've looked at those and if they're helpful to >>>>> you. >>>>> I figured if they aren't then it means the test >>>>> coverage can be improved. So >>>>> you (or facebooker users like us) could probably >>>>> improve it by adding new test >>>>> cases, which should also help with debugging our >>>>> problems as well. >>>>> >>>>> Zhao >>>>> >>>>> On Thu, Sep 4, 2008 at 12:02 AM, Allen Walker >>>>> > >>>>> wrote: >>>>> > Sadly, to do comments I had to implement what >>>>> you have done, which >>>>> > theoretically is much harder than just using the >>>>> built in facebook comments >>>>> > tag. Now that I wish to use a discussion board, >>>>> it really behooves me to >>>>> > figure this out b/c a discussion board is much >>>>> more advanced than just >>>>> > comments. >>>>> > >>>>> > Zhao Lu wrote: >>>>> >> >>>>> >> you are ahead of me, again. >>>>> >> >>>>> >> On Wed, Sep 3, 2008 at 10:46 PM, Allen Walker >>>>> > >>>>> wrote: >>>>> >> >>>>> >>> >>>>> >>> Actually I'm not even doing that. You are >>>>> internally storing you own >>>>> >>> comments. >>>>> >>> >>>>> >>> I'm simply attempting to use facebooks built >>>>> in servers to run my >>>>> >>> dicussion >>>>> >>> boards and comments via the and >>>>> code. It should >>>>> >>> be >>>>> >>> rather trivial and for some reason it's not >>>>> working. It must have >>>>> >>> something >>>>> >>> to do with how facebook is reading the URL and >>>>> not correctly mapping it >>>>> >>> to >>>>> >>> the xid. >>>>> >>> >>>>> >>> Zhao Lu wrote: >>>>> >>> >>>>> >>>> >>>>> >>>> I haven't tried fb_board but I did get >>>>> fb_comment working. The >>>>> >>>> instruction in the beta _book_ wasn't quite >>>>> >>>> complete and I had to look at the source code >>>>> for chapter 8 to get >>>>> >>>> things working. I had the same problem >>>>> >>>> with you (or at least I think it's the same >>>>> problem). Basically I >>>>> >>>> type some comment in the text area and click >>>>> >>>> submit and nothing 'happens'. When I look >>>>> into the database table the >>>>> >>>> new comment is there so what I was >>>>> >>>> missing was to pull the comments out from the >>>>> table and display them. >>>>> >>>> >>>>> >>>> My code structure is pretty much the same as >>>>> karate poke. I have this >>>>> >>>> code snippet in my view: >>>>> >>>> >>>>> >>>> <% form_for Comment.new do %> >>>>> >>>> Comment on gifts:
>>>>> >>>> <%= text_area_tag :body %>
>>>>> >>>> <%= hidden_field_tag :comment_receiver, >>>>> @user.id %> >>>>> >>>> <%= submit_tag 'Post' %> >>>>> >>>> <% end %> >>>>> >>>> >>>>> >>>>
>>>>> >>>> <%= render :partial=>"comments/comments" %> >>>>> >>>>
>>>>> >>>> >>>>> >>>> I was missing the
...
portion >>>>> before. Do you have that and >>>>> >>>> the _comments.erb partial in place? >>>>> >>>> >>>>> >>>> Zhao >>>>> >>>> >>>>> >>>> On Wed, Sep 3, 2008 at 9:37 PM, Allen Walker >>>>> > >>>>> wrote: >>>>> >>>> >>>>> >>>> >>>>> >>>>> >>>>> >>>>> It would sure be nice if these would work. >>>>> >>>>> >>>>> >>>>> I have the following in my home controller: >>>>> >>>>> >>>>> >>>>> <%= fb_board("golf_board1") %> >>>>> >>>>> >>>>> >>>>> it renders: >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> The discussion board shows on my page, but >>>>> when I click start new >>>>> >>>>> topic, >>>>> >>>>> it >>>>> >>>>> reloads the previous URL (default callback) >>>>> and continues to display >>>>> >>>>> "Start >>>>> >>>>> new topic". >>>>> >>>>> >>>>> >>>>> fb_comments does the same thing. >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> Btw my URL is this after clicking "start new >>>>> topic" >>>>> >>>>> >>>>> >>>>> >>>>> http://apps.new.facebook.com/myapp/?fbapp_ec=751 >>>>> >>>>> >>>>> >>>>> thanks >>>>> >>>>> >>>>> _______________________________________________ >>>>> >>>>> >>>>> >>>>> >>>>> > >>>>> > _______________________________________________ >>>>> > Facebooker-talk mailing list >>>>> > Facebooker-talk at rubyforge.org >>>>> >>>>> > >>>>> >>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>> > >>>>> >>>>> >>>>> >>>>> -- >>>>> Zhao >>>>> _______________________________________________ >>>>> Facebooker-talk mailing list >>>>> Facebooker-talk at rubyforge.org >>>>> >>>>> >>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> -- http://auswalk.blogspot.com >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> -- http://auswalk.blogspot.com >>>>> >>>>> _______________________________________________ >>>>> Facebooker-talk mailing list >>>>> Facebooker-talk at rubyforge.org >>>>> >>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> Facebooker-talk mailing list >>>> Facebooker-talk at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >>> -- >>> Mike Mangino >>> http://www.elevatedrails.com >>> >>> >>> >>> >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com > > > > From auswalk at gmail.com Thu Sep 4 18:16:45 2008 From: auswalk at gmail.com (Allen Walker) Date: Thu, 04 Sep 2008 17:16:45 -0500 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: References: <48BF6608.5020107@gmail.com> <48BF763C.5070706@gmail.com> <48BF880D.3050704@gmail.com> <971598f90809040953t79441d04vdd66034ccfda8885@mail.gmail.com> <971598f90809041000r5ea6fb8era1758996134b6491@mail.gmail.com> <48C01979.1070501@gmail.com> <93B0BE49-446F-4A50-8C0D-AFD5689CC250@elevatedrails.com> <48C05301.7080206@gmail.com> Message-ID: <48C05E4D.2030106@gmail.com> Also even though this works, i have urls that are dynamic , i.e. /articles/8 for example and want comments on those pages. That doesn't work. And I can't hardcode a route for a dynamic route that I know of really. Mike Mangino wrote: > Try creating a route just for that page, i.e. > > route.discussion_board 'discussion', :controller=>"home", > :action=>"index" > > Then, go to http://apps.new.facebook.com/myapp/discussion and see if > that works. > > I struggled like mad to get this to work the first time too. I wish I > could remember the eventual fix. > > Mike From mmangino at elevatedrails.com Thu Sep 4 18:24:17 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Thu, 4 Sep 2008 18:24:17 -0400 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: <48C05E4D.2030106@gmail.com> References: <48BF6608.5020107@gmail.com> <48BF763C.5070706@gmail.com> <48BF880D.3050704@gmail.com> <971598f90809040953t79441d04vdd66034ccfda8885@mail.gmail.com> <971598f90809041000r5ea6fb8era1758996134b6491@mail.gmail.com> <48C01979.1070501@gmail.com> <93B0BE49-446F-4A50-8C0D-AFD5689CC250@elevatedrails.com> <48C05301.7080206@gmail.com> <48C05E4D.2030106@gmail.com> Message-ID: <55190A2D-BD8F-4F60-B5D3-E4BBF62A0699@elevatedrails.com> Actually, you can map.fancy_name 'fancy_path/:id' .... Your problems were caused by Facebook sending a POST request to a URL that doesn't support posts. When they try to do that, your application returns an error and they cancel the posting. By creating a route by hand, you are decoupling it from the HTTP method used. Mike On Sep 4, 2008, at 6:16 PM, Allen Walker wrote: > Also even though this works, i have urls that are dynamic , i.e. / > articles/8 for example and want comments on those pages. That > doesn't work. And I can't hardcode a route for a dynamic route that > I know of really. > > Mike Mangino wrote: >> Try creating a route just for that page, i.e. >> >> route.discussion_board >> 'discussion', :controller=>"home", :action=>"index" >> >> Then, go to http://apps.new.facebook.com/myapp/discussion and see >> if that works. >> >> I struggled like mad to get this to work the first time too. I wish >> I could remember the eventual fix. >> >> Mike > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From auswalk at gmail.com Thu Sep 4 18:26:44 2008 From: auswalk at gmail.com (Allen Walker) Date: Thu, 04 Sep 2008 17:26:44 -0500 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: <55190A2D-BD8F-4F60-B5D3-E4BBF62A0699@elevatedrails.com> References: <48BF6608.5020107@gmail.com> <48BF763C.5070706@gmail.com> <48BF880D.3050704@gmail.com> <971598f90809040953t79441d04vdd66034ccfda8885@mail.gmail.com> <971598f90809041000r5ea6fb8era1758996134b6491@mail.gmail.com> <48C01979.1070501@gmail.com> <93B0BE49-446F-4A50-8C0D-AFD5689CC250@elevatedrails.com> <48C05301.7080206@gmail.com> <48C05E4D.2030106@gmail.com> <55190A2D-BD8F-4F60-B5D3-E4BBF62A0699@elevatedrails.com> Message-ID: <48C060A4.70905@gmail.com> That's what I figured and that makes perfect sense. Thanks for clearing that up. you might want to put this in your book btw. Best regards Mike Mangino wrote: > Actually, you can > > map.fancy_name 'fancy_path/:id' .... > > Your problems were caused by Facebook sending a POST request to a URL > that doesn't support posts. When they try to do that, your application > returns an error and they cancel the posting. By creating a route by > hand, you are decoupling it from the HTTP method used. > > Mike > > On Sep 4, 2008, at 6:16 PM, Allen Walker wrote: > >> Also even though this works, i have urls that are dynamic , i.e. >> /articles/8 for example and want comments on those pages. That >> doesn't work. And I can't hardcode a route for a dynamic route that I >> know of really. >> >> Mike Mangino wrote: >>> Try creating a route just for that page, i.e. >>> >>> route.discussion_board 'discussion', :controller=>"home", >>> :action=>"index" >>> >>> Then, go to http://apps.new.facebook.com/myapp/discussion and see if >>> that works. >>> >>> I struggled like mad to get this to work the first time too. I wish >>> I could remember the eventual fix. >>> >>> Mike >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com > > > > From auswalk at gmail.com Thu Sep 4 18:33:25 2008 From: auswalk at gmail.com (Allen Walker) Date: Thu, 04 Sep 2008 17:33:25 -0500 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: <55190A2D-BD8F-4F60-B5D3-E4BBF62A0699@elevatedrails.com> References: <48BF6608.5020107@gmail.com> <48BF763C.5070706@gmail.com> <48BF880D.3050704@gmail.com> <971598f90809040953t79441d04vdd66034ccfda8885@mail.gmail.com> <971598f90809041000r5ea6fb8era1758996134b6491@mail.gmail.com> <48C01979.1070501@gmail.com> <93B0BE49-446F-4A50-8C0D-AFD5689CC250@elevatedrails.com> <48C05301.7080206@gmail.com> <48C05E4D.2030106@gmail.com> <55190A2D-BD8F-4F60-B5D3-E4BBF62A0699@elevatedrails.com> Message-ID: <48C06235.1030304@gmail.com> Ok I still have a question if what you say is correct: I was able to get fb:board to work from /home/new but not simply /home Looking at my rake routes: POST /home {:action=>"create", :controller=>"home"} POST /home.:format {:action=>"create", :controller=>"home"} new_home GET /home/new {:action=>"new", :controller=>"home"} formatted_new_home GET /home/new.:format {:action=>"new", :controller=>"home"} edit_home GET /home/:id/edit {:action=>"edit", :controller=>"home"} formatted_edit_home GET /home/:id/edit.:format {:action=>"edit", :controller=>"home"} home GET /home/:id {:action=>"show", :controller=>"home"} formatted_home GET /home/:id.:format {:action=>"show", :controller=>"home"} PUT /home/:id {:action=>"update", :controller=>"home"} PUT /home/:id.:format {:action=>"update", :controller=>"home"} DELETE /home/:id {:action=>"destroy", :controller=>"home"} DELETE /home/:id.:format {:action=>"destroy", :controller=>"home"} discussion_board /discussion {:action=>"index", :controller=>"home"} If you notice /home does support POST which posts to the "create" action. Whereas /home/new only supports GET from the rake routes information. Unless of course I'm reading it wrong. My only guess is if there is a specific RULE for a POST on a URL then it messes up b/c rails tries to intercept the POST before facebook can. Mike Mangino wrote: > Actually, you can > > map.fancy_name 'fancy_path/:id' .... > > Your problems were caused by Facebook sending a POST request to a URL > that doesn't support posts. When they try to do that, your application > returns an error and they cancel the posting. By creating a route by > hand, you are decoupling it from the HTTP method used. > > Mike > > On Sep 4, 2008, at 6:16 PM, Allen Walker wrote: > >> Also even though this works, i have urls that are dynamic , i.e. >> /articles/8 for example and want comments on those pages. That >> doesn't work. And I can't hardcode a route for a dynamic route that I >> know of really. >> >> Mike Mangino wrote: >>> Try creating a route just for that page, i.e. >>> >>> route.discussion_board 'discussion', :controller=>"home", >>> :action=>"index" >>> >>> Then, go to http://apps.new.facebook.com/myapp/discussion and see if >>> that works. >>> >>> I struggled like mad to get this to work the first time too. I wish >>> I could remember the eventual fix. >>> >>> Mike >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com > > > > From auswalk at gmail.com Thu Sep 4 18:51:01 2008 From: auswalk at gmail.com (Allen Walker) Date: Thu, 04 Sep 2008 17:51:01 -0500 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: <1E61A1A0-F35F-4AD8-B8F8-3CA686E279FC@elevatedrails.com> References: <48BF6608.5020107@gmail.com> <48BF763C.5070706@gmail.com> <48BF880D.3050704@gmail.com> <971598f90809040953t79441d04vdd66034ccfda8885@mail.gmail.com> <971598f90809041000r5ea6fb8era1758996134b6491@mail.gmail.com> <48C01979.1070501@gmail.com> <93B0BE49-446F-4A50-8C0D-AFD5689CC250@elevatedrails.com> <48C05301.7080206@gmail.com> <48C05E4D.2030106@gmail.com> <55190A2D-BD8F-4F60-B5D3-E4BBF62A0699@elevatedrails.com> <48C060A4.70905@gmail.com> <1E61A1A0-F35F-4AD8-B8F8-3CA686E279FC@elevatedrails.com> Message-ID: <48C06655.1000701@gmail.com> I remember reading that and just didn't really understand it that well, basically b/c at the time I wasn't really fully up to speed on REST. I guess the only thing you might add is that if the URL handles a POST (not all urls do) then it will cause problems which is why /controller/new with work (POSTing to that URL has no rule) whereas simply POSTing to /controller is handled by rails (sends to :action=>"create") and wont work. Mike Mangino wrote: > It's on page 126 of the newest beta when discussing comments. It isn't > on the boards page. I'll try to get it added there. > > Mike > > On Sep 4, 2008, at 6:26 PM, Allen Walker wrote: > >> That's what I figured and that makes perfect sense. Thanks for >> clearing that up. you might want to put this in your book btw. >> >> Best regards >> >> Mike Mangino wrote: >>> Actually, you can >>> >>> map.fancy_name 'fancy_path/:id' .... >>> >>> Your problems were caused by Facebook sending a POST request to a >>> URL that doesn't support posts. When they try to do that, your >>> application returns an error and they cancel the posting. By >>> creating a route by hand, you are decoupling it from the HTTP method >>> used. >>> >>> Mike >>> >>> On Sep 4, 2008, at 6:16 PM, Allen Walker wrote: >>> >>>> Also even though this works, i have urls that are dynamic , i.e. >>>> /articles/8 for example and want comments on those pages. That >>>> doesn't work. And I can't hardcode a route for a dynamic route that >>>> I know of really. >>>> >>>> Mike Mangino wrote: >>>>> Try creating a route just for that page, i.e. >>>>> >>>>> route.discussion_board 'discussion', :controller=>"home", >>>>> :action=>"index" >>>>> >>>>> Then, go to http://apps.new.facebook.com/myapp/discussion and see >>>>> if that works. >>>>> >>>>> I struggled like mad to get this to work the first time too. I >>>>> wish I could remember the eventual fix. >>>>> >>>>> Mike >>>> >>>> _______________________________________________ >>>> Facebooker-talk mailing list >>>> Facebooker-talk at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >>> -- >>> Mike Mangino >>> http://www.elevatedrails.com >>> >>> >>> >>> >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com > > > > From auswalk at gmail.com Fri Sep 5 01:50:09 2008 From: auswalk at gmail.com (Allen Walker) Date: Fri, 05 Sep 2008 00:50:09 -0500 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: References: <48BF6608.5020107@gmail.com> <971598f90809041000r5ea6fb8era1758996134b6491@mail.gmail.com> <48C01979.1070501@gmail.com> <93B0BE49-446F-4A50-8C0D-AFD5689CC250@elevatedrails.com> <48C05301.7080206@gmail.com> <48C05E4D.2030106@gmail.com> <55190A2D-BD8F-4F60-B5D3-E4BBF62A0699@elevatedrails.com> <48C060A4.70905@gmail.com> Message-ID: <48C0C891.5070908@gmail.com> Yeah I'm not really sure. Apparently I need to immerse myself in REST wrt Rails. I'm pretty confused I guess. Running "rake routes" can cause additional confusion sometimes. The thing to understand with the problem here is that the URL has to accept POST requests. /controller/new does by the REST definition... and therefore will work with the fb:comments tag. /controller by itself won't accept a POST and therefore won't work with the fb:comments tag. Right now I'm so confused that any page I put a fb:comments or fb:board on I make sure is /controller/new . But that is not really ideal. Ken Schroeder wrote: > Been following along with your thread here as I've had the same exact > issue. So what did you add in your routes for your > /article/8 example which I assume is the show path. > > Using Mikes example of map.fancy_name 'fancy_path/:id' .... didn't > quite undetstand how to input that correctly. > > On Thu, Sep 4, 2008 at 6:26 PM, Allen Walker > wrote: > > That's what I figured and that makes perfect sense. Thanks for > clearing that up. you might want to put this in your book btw. > > Best regards > > > Mike Mangino wrote: > > Actually, you can > > map.fancy_name 'fancy_path/:id' .... > > Your problems were caused by Facebook sending a POST request > to a URL that doesn't support posts. When they try to do that, > your application returns an error and they cancel the posting. > By creating a route by hand, you are decoupling it from the > HTTP method used. > > Mike > > On Sep 4, 2008, at 6:16 PM, Allen Walker wrote: > > Also even though this works, i have urls that are dynamic > , i.e. /articles/8 for example and want comments on those > pages. That doesn't work. And I can't hardcode a route for > a dynamic route that I know of really. > > Mike Mangino wrote: > > Try creating a route just for that page, i.e. > > route.discussion_board 'discussion', > :controller=>"home", :action=>"index" > > Then, go to > http://apps.new.facebook.com/myapp/discussion and see > if that works. > > I struggled like mad to get this to work the first > time too. I wish I could remember the eventual fix. > > Mike > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > -- > Mike Mangino > http://www.elevatedrails.com > > > > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > From marcdurden at gmail.com Fri Sep 5 03:35:59 2008 From: marcdurden at gmail.com (Marco Durden) Date: Fri, 5 Sep 2008 00:35:59 -0700 Subject: [Facebooker-talk] fb_sig_in_iframe=1 Message-ID: I am using fbml, and need to use inside an tag. This would mean I would need an fb_sig_in_iframe=1 in the signatures sent to facebook. When I try to display the link on a page, it displays what should be an iframe inserted into my page as plain text. When I view the source of the page, I check the fbml code, and it seems as if the entire link is sanitized. I know facebook sanitizes there links, but displaying an iframe inside fbml seems to be a problem that I can't seem to figure out. Has anyone else seen this problem? I didn't find anywhere in the facebooker code that uses the fb_sig_in_iframe. Any ideas are greatly appreciated. Best -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Fri Sep 5 08:27:09 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Fri, 5 Sep 2008 08:27:09 -0400 Subject: [Facebooker-talk] fb_sig_in_iframe=1 In-Reply-To: References: Message-ID: <243BDFC6-3A65-49D3-90AA-41B776347D16@elevatedrails.com> I don't think you send fb_sig_in_iframe to Facebook, I think they send it to you, don't they? When you include fb:iframe inside an FBML tag, Facebook adds an iframe with a URL that points to the source. On the first request, they include all of the normal Facebook parameters. The browser displays the result as HTML. Can you give us an example of what you are seeing and some of the code? On Sep 5, 2008, at 3:35 AM, Marco Durden wrote: > I am using fbml, and need to use inside an > tag. This would mean I would need an fb_sig_in_iframe=1 in the > signatures sent to facebook. When I try to display the > link on a page, it displays what should be an iframe inserted into > my page as plain text. When I view the source of the page, I check > the fbml code, and it seems as if the entire link is sanitized. I > know facebook sanitizes there links, but displaying an iframe inside > fbml seems to be a problem that I can't seem to figure out. Has > anyone else seen this problem? I didn't find anywhere in the > facebooker code that uses the fb_sig_in_iframe. Any ideas are > greatly appreciated. > > Best > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From marcdurden at gmail.com Fri Sep 5 17:58:02 2008 From: marcdurden at gmail.com (Marco Durden) Date: Fri, 5 Sep 2008 14:58:02 -0700 Subject: [Facebooker-talk] fb_sig_in_iframe=1 In-Reply-To: <243BDFC6-3A65-49D3-90AA-41B776347D16@elevatedrails.com> References: <243BDFC6-3A65-49D3-90AA-41B776347D16@elevatedrails.com> Message-ID: Regarding the iframe, here is the fbml in my source: When looking at the actual canvas page that my app is located at, this is displayed in plain text, but it should actually be the iframe of the offers displayed: I am using shanev's super rewards gem. Here is my controller code: app/controllers/offerscontroller.rb def index @offer_code = SuperRewards::Client.offers_display(:fbml, current_user.facebook_id) end Here is my view code app/views/offers/index.fbml.erb <%= @offer_code %> For some reason it looks as if the link that should be created from the offers_display method is being sanitized. Not sure if there is a problem with the way I set up the gem or if there is a problem with parsing the actual link. It seems the parse.rb file for the gem by shanev has many of the same methods as the parse.rb file included in facebooker, although they have been extracted to their own Reward module, along with a few other unique methods for the gem. The instructions on how to get the gem installed and working are very minimal, as running sudo gem install did not work. I had to download the files and place them in my app. I am not sure if I am supposed to include the files, or require the files, or use some other method of getting it working. So what I did, was placed the files in railsapp/lib folder, and I did an "include {ModulesName}" in the offerscontroller. Please let me know if there is a better way of doing this. I did not see a setup.rb file of install.rb file, and I am not sure where I would include/require the gem if I were to place it in my gems directory. Here is the development.log data: Processing OffersController#index (for 127.0.0.1 at 2008-09-05 14:23:42) [GET] Session ID: 07c11f9c0erdf193245ff23b-153457602 Parameters: {"fb_sig_time"=>"1220649821.887", "fb_sig"=>"65d5372a2a37583617db71e93164321b", "fb_sig_in_new_facebook"=>"1", "_method"=>"GET", "fb_sig_locale"=>"en_US", "action"=>"index", "fb_sig_session_key"=>"07c11f9c0erdf193245ff23b-153457602", "fb_sig_position_fix"=>"1", "fb_sig_in_canvas"=>"1", "fb_sig_request_method"=>"GET", "controller"=>"offers", "fb_sig_expires"=>"0", "fb_sig_added"=>"1", "fb_sig_friends"=>"2134137106", "fb_sig_api_key"=>"d34d0eb94f008ba670f8317e0vf3486a", "fb_sig_user"=>" 153457602", "fb_sig_profile_update_time"=>"1217562451"} User Load (0.000470) SELECT * FROM users WHERE (users."facebook_id" = 153457602) LIMIT 1 Rendering template within layouts/application Rendering offers/index Completed in 0.24300 (4 reqs/sec) | Rendering: 0.00405 (1%) | DB: 0.00047 (0%) | 200 OK [http://myserver.com/offers] Looking at the log data, there is no mention of fb_sig_in_iframe = 1. There are also no errors shown, just a sanitized iframe link. If you have any ideas of what is going wrong here, I would greatly appreciate any feedback. Best On Fri, Sep 5, 2008 at 5:27 AM, Mike Mangino wrote: > I don't think you send fb_sig_in_iframe to Facebook, I think they send it > to you, don't they? > > When you include fb:iframe inside an FBML tag, Facebook adds an iframe with > a URL that points to the source. On the first request, they include all of > the normal Facebook parameters. The browser displays the result as HTML. > > Can you give us an example of what you are seeing and some of the code? > > > On Sep 5, 2008, at 3:35 AM, Marco Durden wrote: > > I am using fbml, and need to use inside an tag. >> This would mean I would need an fb_sig_in_iframe=1 in the signatures sent >> to facebook. When I try to display the link on a page, it >> displays what should be an iframe inserted into my page as plain text. When >> I view the source of the page, I check the fbml code, and it seems as if the >> entire link is sanitized. I know facebook sanitizes there links, but >> displaying an iframe inside fbml seems to be a problem that I can't seem to >> figure out. Has anyone else seen this problem? I didn't find anywhere in >> the facebooker code that uses the fb_sig_in_iframe. Any ideas are greatly >> appreciated. >> >> Best >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > > -- > Mike Mangino > http://www.elevatedrails.com > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcdurden at gmail.com Fri Sep 5 18:18:42 2008 From: marcdurden at gmail.com (Marco Durden) Date: Fri, 5 Sep 2008 15:18:42 -0700 Subject: [Facebooker-talk] fb_sig_in_iframe=1 In-Reply-To: References: <243BDFC6-3A65-49D3-90AA-41B776347D16@elevatedrails.com> Message-ID: I should have mentioned in my last post that using the no-api fb:iframe link in my view code actually works. here is the code in my view: This code properly displays the iframe offers. The fbml in my page source is correct as follows: Offers
Any ideas? Reviews much appreciated. On Fri, Sep 5, 2008 at 2:58 PM, Marco Durden wrote: > Regarding the iframe, here is the fbml in my source: > > > > > When looking at the actual canvas page that my app is located at, this is > displayed in plain text, but it should actually be the iframe of the offers > displayed: > > scrolling="no" /> > > I am using shanev's super rewards gem. Here is my controller code: > > app/controllers/offerscontroller.rb > def index > @offer_code = SuperRewards::Client.offers_display(:fbml, > current_user.facebook_id) > end > > Here is my view code > > app/views/offers/index.fbml.erb > > <%= @offer_code %> > > > For some reason it looks as if the link that should be created from the > offers_display method is being sanitized. Not sure if there is a problem > with the way I set up the gem or if there is a problem with parsing the > actual link. It seems the parse.rb file for the gem by shanev has many of > the same methods as the parse.rb file included in facebooker, although they > have been extracted to their own Reward module, along with a few other > unique methods for the gem. The instructions on how to get the gem > installed and working are very minimal, as running sudo gem install did not > work. I had to download the files and place them in my app. I am not sure > if I am supposed to include the files, or require the files, or use some > other method of getting it working. So what I did, was placed the files in > railsapp/lib folder, and I did an "include {ModulesName}" in the > offerscontroller. Please let me know if there is a better way of doing > this. I did not see a setup.rb file of install.rb file, and I am not sure > where I would include/require the gem if I were to place it in my gems > directory. > > Here is the development.log data: > > Processing OffersController#index (for 127.0.0.1 at 2008-09-05 14:23:42) > [GET] > Session ID: 07c11f9c0erdf193245ff23b-153457602 > Parameters: {"fb_sig_time"=>"1220649821.887", > "fb_sig"=>"65d5372a2a37583617db71e93164321b", "fb_sig_in_new_facebook"=>"1", > "_method"=>"GET", "fb_sig_locale"=>"en_US", "action"=>"index", > "fb_sig_session_key"=>"07c11f9c0erdf193245ff23b-153457602", > "fb_sig_position_fix"=>"1", "fb_sig_in_canvas"=>"1", > "fb_sig_request_method"=>"GET", "controller"=>"offers", > "fb_sig_expires"=>"0", "fb_sig_added"=>"1", "fb_sig_friends"=>"2134137106", > "fb_sig_api_key"=>"d34d0eb94f008ba670f8317e0vf3486a", "fb_sig_user"=>" > 153457602", "fb_sig_profile_update_time"=>"1217562451"} > [4;35;1mUser Load (0.000470) [0m [0mSELECT * FROM users WHERE > (users."facebook_id" = 153457602) LIMIT 1 [0m > Rendering template within layouts/application > Rendering offers/index > Completed in 0.24300 (4 reqs/sec) | Rendering: 0.00405 (1%) | DB: 0.00047 > (0%) | 200 OK [http://myserver.com/offers] > > > Looking at the log data, there is no mention of fb_sig_in_iframe = 1. > There are also no errors shown, just a sanitized iframe link. If you have > any ideas of what is going wrong here, I would greatly appreciate any > feedback. > > Best > > > On Fri, Sep 5, 2008 at 5:27 AM, Mike Mangino wrote: > >> I don't think you send fb_sig_in_iframe to Facebook, I think they send it >> to you, don't they? >> >> When you include fb:iframe inside an FBML tag, Facebook adds an iframe >> with a URL that points to the source. On the first request, they include all >> of the normal Facebook parameters. The browser displays the result as HTML. >> >> Can you give us an example of what you are seeing and some of the code? >> >> >> On Sep 5, 2008, at 3:35 AM, Marco Durden wrote: >> >> I am using fbml, and need to use inside an tag. >>> This would mean I would need an fb_sig_in_iframe=1 in the signatures sent >>> to facebook. When I try to display the link on a page, it >>> displays what should be an iframe inserted into my page as plain text. When >>> I view the source of the page, I check the fbml code, and it seems as if the >>> entire link is sanitized. I know facebook sanitizes there links, but >>> displaying an iframe inside fbml seems to be a problem that I can't seem to >>> figure out. Has anyone else seen this problem? I didn't find anywhere in >>> the facebooker code that uses the fb_sig_in_iframe. Any ideas are greatly >>> appreciated. >>> >>> Best >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >> >> -- >> Mike Mangino >> http://www.elevatedrails.com >> >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Sat Sep 6 09:10:38 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Sat, 6 Sep 2008 09:10:38 -0400 Subject: [Facebooker-talk] fb_sig_in_iframe=1 In-Reply-To: References: <243BDFC6-3A65-49D3-90AA-41B776347D16@elevatedrails.com> Message-ID: <5989D26F-15ED-4B2F-95ED-AF89936599E6@elevatedrails.com> This looks more like a problem with the superrewards gem than facebooker. The URL does look like it is being escaped. Are you using any plugin that autoescapes ERB? Does a normal <%= link_to "blah","/blah"%> work? You might try the support forum for the superrewards gem. Mike On Sep 5, 2008, at 5:58 PM, Marco Durden wrote: > Regarding the iframe, here is the fbml in my source: > > > > When looking at the actual canvas page that my app is located at, > this is displayed in plain text, but it should actually be the > iframe of the offers displayed: > > > > I am using shanev's super rewards gem. Here is my controller code: > > app/controllers/offerscontroller.rb > def index > @offer_code = SuperRewards::Client.offers_display(:fbml, > current_user.facebook_id) > end > > Here is my view code > > app/views/offers/index.fbml.erb > > <%= @offer_code %> > > > For some reason it looks as if the link that should be created from > the offers_display method is being sanitized. Not sure if there is > a problem with the way I set up the gem or if there is a problem > with parsing the actual link. It seems the parse.rb file for the > gem by shanev has many of the same methods as the parse.rb file > included in facebooker, although they have been extracted to their > own Reward module, along with a few other unique methods for the > gem. The instructions on how to get the gem installed and working > are very minimal, as running sudo gem install did not work. I had > to download the files and place them in my app. I am not sure if I > am supposed to include the files, or require the files, or use some > other method of getting it working. So what I did, was placed the > files in railsapp/lib folder, and I did an "include {ModulesName}" > in the offerscontroller. Please let me know if there is a better > way of doing this. I did not see a setup.rb file of install.rb > file, and I am not sure where I would include/require the gem if I > were to place it in my gems directory. > > Here is the development.log data: > > Processing OffersController#index (for 127.0.0.1 at 2008-09-05 > 14:23:42) [GET] > Session ID: 07c11f9c0erdf193245ff23b-153457602 > Parameters: {"fb_sig_time"=>"1220649821.887", > "fb_sig"=>"65d5372a2a37583617db71e93164321b", > "fb_sig_in_new_facebook"=>"1", "_method"=>"GET", > "fb_sig_locale"=>"en_US", "action"=>"index", > "fb_sig_session_key"=>"07c11f9c0erdf193245ff23b-153457602", > "fb_sig_position_fix"=>"1", "fb_sig_in_canvas"=>"1", > "fb_sig_request_method"=>"GET", "controller"=>"offers", > "fb_sig_expires"=>"0", "fb_sig_added"=>"1", > "fb_sig_friends"=>"2134137106", > "fb_sig_api_key"=>"d34d0eb94f008ba670f8317e0vf3486a", > "fb_sig_user"=>"153457602", > "fb_sig_profile_update_time"=>"1217562451"} > User Load (0.000470) SELECT * FROM users WHERE > (users."facebook_id" = 153457602) LIMIT 1 > Rendering template within layouts/application > Rendering offers/index > Completed in 0.24300 (4 reqs/sec) | Rendering: 0.00405 (1%) | DB: > 0.00047 (0%) | 200 OK [http://myserver.com/offers] > > > Looking at the log data, there is no mention of fb_sig_in_iframe = > 1. There are also no errors shown, just a sanitized iframe link. > If you have any ideas of what is going wrong here, I would greatly > appreciate any feedback. > > Best > > On Fri, Sep 5, 2008 at 5:27 AM, Mike Mangino > wrote: > I don't think you send fb_sig_in_iframe to Facebook, I think they > send it to you, don't they? > > When you include fb:iframe inside an FBML tag, Facebook adds an > iframe with a URL that points to the source. On the first request, > they include all of the normal Facebook parameters. The browser > displays the result as HTML. > > Can you give us an example of what you are seeing and some of the > code? > > > > On Sep 5, 2008, at 3:35 AM, Marco Durden wrote: > > I am using fbml, and need to use inside an > tag. This would mean I would need an fb_sig_in_iframe=1 in the > signatures sent to facebook. When I try to display the > link on a page, it displays what should be an iframe inserted into > my page as plain text. When I view the source of the page, I check > the fbml code, and it seems as if the entire link is sanitized. I > know facebook sanitizes there links, but displaying an iframe inside > fbml seems to be a problem that I can't seem to figure out. Has > anyone else seen this problem? I didn't find anywhere in the > facebooker code that uses the fb_sig_in_iframe. Any ideas are > greatly appreciated. > > Best > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com > > > > -- Mike Mangino http://www.elevatedrails.com From jonathan.otto at gmail.com Sun Sep 7 20:01:56 2008 From: jonathan.otto at gmail.com (Jonathan Otto) Date: Sun, 7 Sep 2008 19:01:56 -0500 Subject: [Facebooker-talk] Images in the new feeds Message-ID: I think there is some work to be done in Facebooker helpers for "Publishing" to the new wall feed. This also applies to posting images to either of the feeds. So far I am just creating a hash, converting it to JSON and then render :text => theHash theHash = { :content => { :feed => { :template_id => Facebooker::Rails::Publisher::FacebookTemplate.for("publish_pokes"), :template_data => { :images => { 1 => { :src => img_src_url, :href => href_url } }, :activity => activity_to_do_more_of || "Exercising" } } }, :method => "publisher_getFeedStory" } Let me know if I overlooked an existing feature. Also, FYI - the documentation for posting images to the feed is non-existent. What I have here is derived from a PHP example. From jonathan.otto at gmail.com Sun Sep 7 20:06:34 2008 From: jonathan.otto at gmail.com (Jonathan Otto) Date: Sun, 7 Sep 2008 19:06:34 -0500 Subject: [Facebooker-talk] Images in the new feeds In-Reply-To: References: Message-ID: Wrong about images documentation for at least sending messages to the feed, see here: http://wiki.developers.facebook.com/index.php/Feed.publishUserAction On Sun, Sep 7, 2008 at 7:01 PM, Jonathan Otto wrote: > I think there is some work to be done in Facebooker helpers for > "Publishing" to the new wall feed. > > This also applies to posting images to either of the feeds. > > So far I am just creating a hash, converting it to JSON and then > render :text => theHash > > theHash = { > :content => { > :feed => { > :template_id => > Facebooker::Rails::Publisher::FacebookTemplate.for("publish_pokes"), > :template_data => { > :images => { > 1 => { > :src => img_src_url, > :href => href_url > } > }, > :activity => activity_to_do_more_of || "Exercising" > } > } > }, > :method => "publisher_getFeedStory" > } > > Let me know if I overlooked an existing feature. Also, FYI - the > documentation for posting images to the feed is non-existent. What I > have here is derived from a PHP example. > From jonathan.otto at gmail.com Mon Sep 8 01:27:39 2008 From: jonathan.otto at gmail.com (Jonathan Otto) Date: Mon, 8 Sep 2008 00:27:39 -0500 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: <48C0C891.5070908@gmail.com> References: <48BF6608.5020107@gmail.com> <48C01979.1070501@gmail.com> <93B0BE49-446F-4A50-8C0D-AFD5689CC250@elevatedrails.com> <48C05301.7080206@gmail.com> <48C05E4D.2030106@gmail.com> <55190A2D-BD8F-4F60-B5D3-E4BBF62A0699@elevatedrails.com> <48C060A4.70905@gmail.com> <48C0C891.5070908@gmail.com> Message-ID: just add the _method parameter to your URL for the callback parameter (you need to specify it), this will force rails to interpret the request as GET. for example, a RESTful URL works like so: user_url @user, :_method => :get On Fri, Sep 5, 2008 at 12:50 AM, Allen Walker wrote: > Yeah I'm not really sure. Apparently I need to immerse myself in REST wrt > Rails. I'm pretty confused I guess. Running "rake routes" can cause > additional confusion sometimes. > > The thing to understand with the problem here is that the URL has to accept > POST requests. /controller/new does by the REST definition... and therefore > will work with the fb:comments tag. /controller by itself won't accept a > POST and therefore won't work with the fb:comments tag. > > Right now I'm so confused that any page I put a fb:comments or fb:board on I > make sure is /controller/new . But that is not really ideal. > > Ken Schroeder wrote: >> >> Been following along with your thread here as I've had the same exact >> issue. So what did you add in your routes for your >> /article/8 example which I assume is the show path. >> >> Using Mikes example of map.fancy_name 'fancy_path/:id' .... didn't quite >> undetstand how to input that correctly. >> >> On Thu, Sep 4, 2008 at 6:26 PM, Allen Walker > > wrote: >> >> That's what I figured and that makes perfect sense. Thanks for >> clearing that up. you might want to put this in your book btw. >> >> Best regards >> >> >> Mike Mangino wrote: >> >> Actually, you can >> >> map.fancy_name 'fancy_path/:id' .... >> >> Your problems were caused by Facebook sending a POST request >> to a URL that doesn't support posts. When they try to do that, >> your application returns an error and they cancel the posting. >> By creating a route by hand, you are decoupling it from the >> HTTP method used. >> >> Mike >> >> On Sep 4, 2008, at 6:16 PM, Allen Walker wrote: >> >> Also even though this works, i have urls that are dynamic >> , i.e. /articles/8 for example and want comments on those >> pages. That doesn't work. And I can't hardcode a route for >> a dynamic route that I know of really. >> >> Mike Mangino wrote: >> >> Try creating a route just for that page, i.e. >> >> route.discussion_board 'discussion', >> :controller=>"home", :action=>"index" >> >> Then, go to >> http://apps.new.facebook.com/myapp/discussion and see >> if that works. >> >> I struggled like mad to get this to work the first >> time too. I wish I could remember the eventual fix. >> >> Mike >> >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> >> -- Mike Mangino >> http://www.elevatedrails.com >> >> >> >> >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > From jonathan.otto at gmail.com Mon Sep 8 01:38:37 2008 From: jonathan.otto at gmail.com (Jonathan Otto) Date: Mon, 8 Sep 2008 00:38:37 -0500 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: References: <48BF6608.5020107@gmail.com> <93B0BE49-446F-4A50-8C0D-AFD5689CC250@elevatedrails.com> <48C05301.7080206@gmail.com> <48C05E4D.2030106@gmail.com> <55190A2D-BD8F-4F60-B5D3-E4BBF62A0699@elevatedrails.com> <48C060A4.70905@gmail.com> <48C0C891.5070908@gmail.com> Message-ID: Here is the exact code: some title On Mon, Sep 8, 2008 at 12:27 AM, Jonathan Otto wrote: > just add the _method parameter to your URL for the callback parameter > (you need to specify it), this will force rails to interpret the > request as GET. for example, a RESTful URL works like so: > > user_url @user, :_method => :get > > > On Fri, Sep 5, 2008 at 12:50 AM, Allen Walker wrote: >> Yeah I'm not really sure. Apparently I need to immerse myself in REST wrt >> Rails. I'm pretty confused I guess. Running "rake routes" can cause >> additional confusion sometimes. >> >> The thing to understand with the problem here is that the URL has to accept >> POST requests. /controller/new does by the REST definition... and therefore >> will work with the fb:comments tag. /controller by itself won't accept a >> POST and therefore won't work with the fb:comments tag. >> >> Right now I'm so confused that any page I put a fb:comments or fb:board on I >> make sure is /controller/new . But that is not really ideal. >> >> Ken Schroeder wrote: >>> >>> Been following along with your thread here as I've had the same exact >>> issue. So what did you add in your routes for your >>> /article/8 example which I assume is the show path. >>> >>> Using Mikes example of map.fancy_name 'fancy_path/:id' .... didn't quite >>> undetstand how to input that correctly. >>> >>> On Thu, Sep 4, 2008 at 6:26 PM, Allen Walker >> > wrote: >>> >>> That's what I figured and that makes perfect sense. Thanks for >>> clearing that up. you might want to put this in your book btw. >>> >>> Best regards >>> >>> >>> Mike Mangino wrote: >>> >>> Actually, you can >>> >>> map.fancy_name 'fancy_path/:id' .... >>> >>> Your problems were caused by Facebook sending a POST request >>> to a URL that doesn't support posts. When they try to do that, >>> your application returns an error and they cancel the posting. >>> By creating a route by hand, you are decoupling it from the >>> HTTP method used. >>> >>> Mike >>> >>> On Sep 4, 2008, at 6:16 PM, Allen Walker wrote: >>> >>> Also even though this works, i have urls that are dynamic >>> , i.e. /articles/8 for example and want comments on those >>> pages. That doesn't work. And I can't hardcode a route for >>> a dynamic route that I know of really. >>> >>> Mike Mangino wrote: >>> >>> Try creating a route just for that page, i.e. >>> >>> route.discussion_board 'discussion', >>> :controller=>"home", :action=>"index" >>> >>> Then, go to >>> http://apps.new.facebook.com/myapp/discussion and see >>> if that works. >>> >>> I struggled like mad to get this to work the first >>> time too. I wish I could remember the eventual fix. >>> >>> Mike >>> >>> >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >>> >>> -- Mike Mangino >>> http://www.elevatedrails.com >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >>> >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > From msummers at solarpowerme.com Mon Sep 8 15:37:00 2008 From: msummers at solarpowerme.com (Mike Summers) Date: Mon, 08 Sep 2008 14:37:00 -0500 Subject: [Facebooker-talk] Init sequence for a non-Rails app? Message-ID: <48C57EDC.7020008@solarpowerme.com> An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Mon Sep 8 16:27:20 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Mon, 8 Sep 2008 16:27:20 -0400 Subject: [Facebooker-talk] Init sequence for a non-Rails app? In-Reply-To: <48C57EDC.7020008@solarpowerme.com> References: <48C57EDC.7020008@solarpowerme.com> Message-ID: <6A2CAAB6-F6FF-4858-B771-1116A2527E32@elevatedrails.com> Are you using a gem or a plugin? Do you have a config/facebooker.yml file? Mike On Sep 8, 2008, at 3:37 PM, Mike Summers wrote: > I'm trying to migrate from the 0.9.5 gem to the current git copy and > I'm getting "Could not find configuration information for secret" > which make me think I'm missing a init call or two. > > Thanks-- Mike > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From msummers at solarpowerme.com Mon Sep 8 16:51:03 2008 From: msummers at solarpowerme.com (Mike Summers) Date: Mon, 08 Sep 2008 15:51:03 -0500 Subject: [Facebooker-talk] Init sequence for a non-Rails app? In-Reply-To: <6A2CAAB6-F6FF-4858-B771-1116A2527E32@elevatedrails.com> References: <48C57EDC.7020008@solarpowerme.com> <6A2CAAB6-F6FF-4858-B771-1116A2527E32@elevatedrails.com> Message-ID: <48C59037.6000303@solarpowerme.com> An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Mon Sep 8 17:06:48 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Mon, 8 Sep 2008 17:06:48 -0400 Subject: [Facebooker-talk] Init sequence for a non-Rails app? In-Reply-To: <48C59037.6000303@solarpowerme.com> References: <48C57EDC.7020008@solarpowerme.com> <6A2CAAB6-F6FF-4858-B771-1116A2527E32@elevatedrails.com> <48C59037.6000303@solarpowerme.com> Message-ID: You may be the first person to try to use the newer version outside of Rails. I would guess that we will need to fix up the manifest to include the new files. It sounds like the initialization needs a little work too. I can definitely give you some guidance on what might need to change if you want to give it a shot. Mike On Sep 8, 2008, at 4:51 PM, Mike Summers wrote: > gem, yes working config/facebooker.yml (with the 0.9.5 gem) > > My problem maybe more fundamental... can I use the git distribution > in a non-Rails environment? It looks like we need the git updates > for the new FB profile. > > Thanks for your time. > > Mike Mangino wrote: >> >> Are you using a gem or a plugin? >> >> Do you have a config/facebooker.yml file? >> >> Mike >> >> On Sep 8, 2008, at 3:37 PM, Mike Summers wrote: >> >>> I'm trying to migrate from the 0.9.5 gem to the current git copy >>> and I'm getting "Could not find configuration information for >>> secret" which make me think I'm missing a init call or two. >>> >>> Thanks-- Mike >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> -- >> Mike Mangino >> http://www.elevatedrails.com >> >> >> >> -- Mike Mangino http://www.elevatedrails.com From msummers at solarpowerme.com Mon Sep 8 17:21:29 2008 From: msummers at solarpowerme.com (Mike Summers) Date: Mon, 08 Sep 2008 16:21:29 -0500 Subject: [Facebooker-talk] Init sequence for a non-Rails app? In-Reply-To: References: <48C57EDC.7020008@solarpowerme.com> <6A2CAAB6-F6FF-4858-B771-1116A2527E32@elevatedrails.com> <48C59037.6000303@solarpowerme.com> Message-ID: <48C59759.3050400@solarpowerme.com> An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Mon Sep 8 19:27:48 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Mon, 8 Sep 2008 19:27:48 -0400 Subject: [Facebooker-talk] Init sequence for a non-Rails app? In-Reply-To: <48C59759.3050400@solarpowerme.com> References: <48C57EDC.7020008@solarpowerme.com> <6A2CAAB6-F6FF-4858-B771-1116A2527E32@elevatedrails.com> <48C59037.6000303@solarpowerme.com> <48C59759.3050400@solarpowerme.com> Message-ID: I just committed a few changes that allow me to refresh a URL ref from irb without require rails. Basically, you'll need to update to the latest version of the code and run rake package and then install the resulting 0.9.9 gem From your ruby application, you can run: Facebooker.load_configuration("config/facebooker.yml") to load the configuration. It expects a yaml file without the environments. So just: api_key: secret_key: canvas_page_name: callback_url: tunnel: public_host_username: public_host: public_port: 4007 local_port: 3000 Let me know how that works. Mike On Sep 8, 2008, at 5:21 PM, Mike Summers wrote: > You have time that would be great, I'd really like to get this > working. > > Let me know how you want to proceed. > > Thanks a lot. > > Mike Mangino wrote: >> >> You may be the first person to try to use the newer version outside >> of Rails. I would guess that we will need to fix up the manifest to >> include the new files. It sounds like the initialization needs a >> little work too. I can definitely give you some guidance on what >> might need to change if you want to give it a shot. >> >> Mike >> >> On Sep 8, 2008, at 4:51 PM, Mike Summers wrote: >> >>> gem, yes working config/facebooker.yml (with the 0.9.5 gem) >>> >>> My problem maybe more fundamental... can I use the git >>> distribution in a non-Rails environment? It looks like we need the >>> git updates for the new FB profile. >>> >>> Thanks for your time. >>> >>> Mike Mangino wrote: >>>> >>>> Are you using a gem or a plugin? >>>> >>>> Do you have a config/facebooker.yml file? >>>> >>>> Mike >>>> >>>> On Sep 8, 2008, at 3:37 PM, Mike Summers wrote: >>>> >>>>> I'm trying to migrate from the 0.9.5 gem to the current git copy >>>>> and I'm getting "Could not find configuration information for >>>>> secret" which make me think I'm missing a init call or two. >>>>> >>>>> Thanks-- Mike >>>>> _______________________________________________ >>>>> Facebooker-talk mailing list >>>>> Facebooker-talk at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>> >>>> -- >>>> Mike Mangino >>>> http://www.elevatedrails.com >>>> >>>> >>>> >>>> >> >> -- >> Mike Mangino >> http://www.elevatedrails.com >> >> >> >> -- Mike Mangino http://www.elevatedrails.com From george at xapblog.com Mon Sep 8 19:49:01 2008 From: george at xapblog.com (George Deglin) Date: Mon, 8 Sep 2008 16:49:01 -0700 Subject: [Facebooker-talk] InvalidAuthenticityToken when user adds application through facebook registration Message-ID: If a user that has not yet signed up for Facebook attempts to visit an application page facebook presents them with a registration form. After this form is completed, the application is automatically added to the user's account and Facebook displays the following message: Welcome George Tesster! Your account has been created. [application] has been added to your account. Facebook also issues a post request similar to the following: Processing HomeController#index (for 127.0.0.1 at 2008-09-08 16:36:48) [POST] Session ID: b3286f3c51ba8da745b45732-1487557007 Parameters: {"fb_sig_time"=>"1220917013.3643", "fb_sig"=>"95fcf4dabcc91059e5c8452155708142", "installed"=>"1", "action"=>"inde x", "fb_sig_session_key"=>"b3286f3c51ba8da745b45732-1487557007", "auth_token"=>"a3a7138b014d8a4ceedc6fdbc3cd3822", "controller"= >"home", "fb_sig_expires"=>"0", "fb_sig_added"=>"1", "fb_sig_api_key"=>"06565c8dc05254276bcffcff049f604b", "fb_sig_profile_updat e_time"=>"0", "fb_sig_user"=>"1487557007", "fb_sig_registration"=>"1"} Rails then throws the following error: ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken): c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/request_forgery_protection.rb:86:in `verify_authenticity_token' -------------- next part -------------- An HTML attachment was scrubbed... URL: From msummers at solarpowerme.com Mon Sep 8 19:52:56 2008 From: msummers at solarpowerme.com (Mike Summers) Date: Mon, 08 Sep 2008 18:52:56 -0500 Subject: [Facebooker-talk] Init sequence for a non-Rails app? In-Reply-To: References: <48C57EDC.7020008@solarpowerme.com> <6A2CAAB6-F6FF-4858-B771-1116A2527E32@elevatedrails.com> <48C59037.6000303@solarpowerme.com> <48C59759.3050400@solarpowerme.com> Message-ID: <48C5BAD8.6060404@solarpowerme.com> An HTML attachment was scrubbed... URL: From zhao.lu.us at gmail.com Tue Sep 9 17:14:34 2008 From: zhao.lu.us at gmail.com (Zhao Lu) Date: Tue, 9 Sep 2008 14:14:34 -0700 Subject: [Facebooker-talk] table inside of facebook_form_for Message-ID: I have a dropdown list (essentially a collection_select) inside of a facebook_form_for. Now I'd like to replace the dropdown list with a table, with each select containing a radio button for selection. I understand that if I do this in html I can use and specify its type to be radiobutton. So my question is how do you do this in facebooker? Anyway code snippet is much appreciated. -- Zhao From auswalk at gmail.com Tue Sep 9 19:02:10 2008 From: auswalk at gmail.com (Allen Walker) Date: Tue, 09 Sep 2008 18:02:10 -0500 Subject: [Facebooker-talk] table inside of facebook_form_for In-Reply-To: References: Message-ID: <48C70072.3080801@gmail.com> This shouldn't be any different inside of facebook or outside. You can also use just form_for inside the facebook canvas if you are struggling using facebook_form_for. I would recommend that for now. Now I know implementing a selection list using radio buttons is somewhat difficult simply b/c of HTML limitations. Zhao Lu wrote: > I have a dropdown list (essentially a collection_select) inside of a > facebook_form_for. > Now I'd like to replace the dropdown list with a table, with each > select containing a radio button for selection. > I understand that if I do this in html I can use and specify > its type to be radiobutton. So my question is > how do you do this in facebooker? Anyway code snippet is much appreciated. > > From auswalk at gmail.com Tue Sep 9 23:40:22 2008 From: auswalk at gmail.com (Allen Walker) Date: Tue, 09 Sep 2008 22:40:22 -0500 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: References: <48BF6608.5020107@gmail.com> <93B0BE49-446F-4A50-8C0D-AFD5689CC250@elevatedrails.com> <48C05301.7080206@gmail.com> <48C05E4D.2030106@gmail.com> <55190A2D-BD8F-4F60-B5D3-E4BBF62A0699@elevatedrails.com> <48C060A4.70905@gmail.com> <48C0C891.5070908@gmail.com> Message-ID: <48C741A6.5070700@gmail.com> I tried the following it posts don't take: "index", :only_path => false, :conditions => {:_method => :get}) %>">some title Jonathan Otto wrote: > Here is the exact code: > > some title > > On Mon, Sep 8, 2008 at 12:27 AM, Jonathan Otto wrote: > >> just add the _method parameter to your URL for the callback parameter >> (you need to specify it), this will force rails to interpret the >> request as GET. for example, a RESTful URL works like so: >> >> user_url @user, :_method => :get >> >> >> On Fri, Sep 5, 2008 at 12:50 AM, Allen Walker wrote: >> >>> Yeah I'm not really sure. Apparently I need to immerse myself in REST wrt >>> Rails. I'm pretty confused I guess. Running "rake routes" can cause >>> additional confusion sometimes. >>> >>> The thing to understand with the problem here is that the URL has to accept >>> POST requests. /controller/new does by the REST definition... and therefore >>> will work with the fb:comments tag. /controller by itself won't accept a >>> POST and therefore won't work with the fb:comments tag. >>> >>> Right now I'm so confused that any page I put a fb:comments or fb:board on I >>> make sure is /controller/new . But that is not really ideal. >>> >>> Ken Schroeder wrote: >>> >>>> Been following along with your thread here as I've had the same exact >>>> issue. So what did you add in your routes for your >>>> /article/8 example which I assume is the show path. >>>> >>>> Using Mikes example of map.fancy_name 'fancy_path/:id' .... didn't quite >>>> undetstand how to input that correctly. >>>> >>>> On Thu, Sep 4, 2008 at 6:26 PM, Allen Walker >>> > wrote: >>>> >>>> That's what I figured and that makes perfect sense. Thanks for >>>> clearing that up. you might want to put this in your book btw. >>>> >>>> Best regards >>>> >>>> >>>> Mike Mangino wrote: >>>> >>>> Actually, you can >>>> >>>> map.fancy_name 'fancy_path/:id' .... >>>> >>>> Your problems were caused by Facebook sending a POST request >>>> to a URL that doesn't support posts. When they try to do that, >>>> your application returns an error and they cancel the posting. >>>> By creating a route by hand, you are decoupling it from the >>>> HTTP method used. >>>> >>>> Mike >>>> >>>> On Sep 4, 2008, at 6:16 PM, Allen Walker wrote: >>>> >>>> Also even though this works, i have urls that are dynamic >>>> , i.e. /articles/8 for example and want comments on those >>>> pages. That doesn't work. And I can't hardcode a route for >>>> a dynamic route that I know of really. >>>> >>>> Mike Mangino wrote: >>>> >>>> Try creating a route just for that page, i.e. >>>> >>>> route.discussion_board 'discussion', >>>> :controller=>"home", :action=>"index" >>>> >>>> Then, go to >>>> http://apps.new.facebook.com/myapp/discussion and see >>>> if that works. >>>> >>>> I struggled like mad to get this to work the first >>>> time too. I wish I could remember the eventual fix. >>>> >>>> Mike >>>> >>>> >>>> _______________________________________________ >>>> Facebooker-talk mailing list >>>> Facebooker-talk at rubyforge.org >>>> >>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>> >>>> >>>> -- Mike Mangino >>>> http://www.elevatedrails.com >>>> >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Facebooker-talk mailing list >>>> Facebooker-talk at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>> >>>> >>>> >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >>> > > From auswalk at gmail.com Tue Sep 9 23:44:18 2008 From: auswalk at gmail.com (Allen Walker) Date: Tue, 09 Sep 2008 22:44:18 -0500 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: <48C741A6.5070700@gmail.com> References: <48BF6608.5020107@gmail.com> <93B0BE49-446F-4A50-8C0D-AFD5689CC250@elevatedrails.com> <48C05301.7080206@gmail.com> <48C05E4D.2030106@gmail.com> <55190A2D-BD8F-4F60-B5D3-E4BBF62A0699@elevatedrails.com> <48C060A4.70905@gmail.com> <48C0C891.5070908@gmail.com> <48C741A6.5070700@gmail.com> Message-ID: <48C74292.8020700@gmail.com> The following DOES work: "index", :only_path => false, :_method => :get) %>">some title Allen Walker wrote: > I tried the following it posts don't take: > > "index", :only_path => false, :conditions => > {:_method => :get}) %>">some title > > Jonathan Otto wrote: >> Here is the exact code: >> >> some title >> >> On Mon, Sep 8, 2008 at 12:27 AM, Jonathan Otto >> wrote: >> >>> just add the _method parameter to your URL for the callback parameter >>> (you need to specify it), this will force rails to interpret the >>> request as GET. for example, a RESTful URL works like so: >>> >>> user_url @user, :_method => :get >>> >>> >>> On Fri, Sep 5, 2008 at 12:50 AM, Allen Walker >>> wrote: >>> >>>> Yeah I'm not really sure. Apparently I need to immerse myself in >>>> REST wrt >>>> Rails. I'm pretty confused I guess. Running "rake routes" can cause >>>> additional confusion sometimes. >>>> >>>> The thing to understand with the problem here is that the URL has >>>> to accept >>>> POST requests. /controller/new does by the REST definition... and >>>> therefore >>>> will work with the fb:comments tag. /controller by itself won't >>>> accept a >>>> POST and therefore won't work with the fb:comments tag. >>>> >>>> Right now I'm so confused that any page I put a fb:comments or >>>> fb:board on I >>>> make sure is /controller/new . But that is not really ideal. >>>> >>>> Ken Schroeder wrote: >>>> >>>>> Been following along with your thread here as I've had the same exact >>>>> issue. So what did you add in your routes for your >>>>> /article/8 example which I assume is the show path. >>>>> >>>>> Using Mikes example of map.fancy_name 'fancy_path/:id' .... didn't >>>>> quite >>>>> undetstand how to input that correctly. >>>>> >>>>> On Thu, Sep 4, 2008 at 6:26 PM, Allen Walker >>>> > wrote: >>>>> >>>>> That's what I figured and that makes perfect sense. Thanks for >>>>> clearing that up. you might want to put this in your book btw. >>>>> >>>>> Best regards >>>>> >>>>> >>>>> Mike Mangino wrote: >>>>> >>>>> Actually, you can >>>>> >>>>> map.fancy_name 'fancy_path/:id' .... >>>>> >>>>> Your problems were caused by Facebook sending a POST request >>>>> to a URL that doesn't support posts. When they try to do that, >>>>> your application returns an error and they cancel the posting. >>>>> By creating a route by hand, you are decoupling it from the >>>>> HTTP method used. >>>>> >>>>> Mike >>>>> >>>>> On Sep 4, 2008, at 6:16 PM, Allen Walker wrote: >>>>> >>>>> Also even though this works, i have urls that are dynamic >>>>> , i.e. /articles/8 for example and want comments on those >>>>> pages. That doesn't work. And I can't hardcode a route for >>>>> a dynamic route that I know of really. >>>>> >>>>> Mike Mangino wrote: >>>>> >>>>> Try creating a route just for that page, i.e. >>>>> >>>>> route.discussion_board 'discussion', >>>>> :controller=>"home", :action=>"index" >>>>> >>>>> Then, go to >>>>> http://apps.new.facebook.com/myapp/discussion and see >>>>> if that works. >>>>> >>>>> I struggled like mad to get this to work the first >>>>> time too. I wish I could remember the eventual fix. >>>>> >>>>> Mike >>>>> >>>>> >>>>> _______________________________________________ >>>>> Facebooker-talk mailing list >>>>> Facebooker-talk at rubyforge.org >>>>> >>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>> >>>>> >>>>> -- Mike Mangino >>>>> http://www.elevatedrails.com >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Facebooker-talk mailing list >>>>> Facebooker-talk at rubyforge.org >>>>> >>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>> >>>>> >>>>> >>>> _______________________________________________ >>>> Facebooker-talk mailing list >>>> Facebooker-talk at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>> >>>> >> >> > > From auswalk at gmail.com Tue Sep 9 23:49:54 2008 From: auswalk at gmail.com (Allen Walker) Date: Tue, 09 Sep 2008 22:49:54 -0500 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: <48C74292.8020700@gmail.com> References: <48BF6608.5020107@gmail.com> <93B0BE49-446F-4A50-8C0D-AFD5689CC250@elevatedrails.com> <48C05301.7080206@gmail.com> <48C05E4D.2030106@gmail.com> <55190A2D-BD8F-4F60-B5D3-E4BBF62A0699@elevatedrails.com> <48C060A4.70905@gmail.com> <48C0C891.5070908@gmail.com> <48C741A6.5070700@gmail.com> <48C74292.8020700@gmail.com> Message-ID: <48C743E2.3090207@gmail.com> Sorry for the multiple posts.. Finally if you wish you CAN use the helper: <%=fb_comments("comments_for_comment_lesson", true, true, 20,:showform => true, :title => "Comment Lesson Comments", :callbackurl => url_for(:controller => "home", :action=>"index", :only_path => false, :_method => :get)) %> Now can you explain to me why this works? You write some text into the facebook generated comments form. It sends an HTTP POST . My :controller=>"home" :action=>"index" has no rule for HTTP POSTS that I see. I'm just really confused at to what exactly is going on here. Allen Walker wrote: > The following DOES work: > > "index", :only_path => false, :_method => :get) > %>">some title > > Allen Walker wrote: >> I tried the following it posts don't take: >> >> "index", :only_path => false, :conditions => >> {:_method => :get}) %>">some title >> >> Jonathan Otto wrote: >>> Here is the exact code: >>> >>> some title >>> >>> On Mon, Sep 8, 2008 at 12:27 AM, Jonathan Otto >>> wrote: >>> >>>> just add the _method parameter to your URL for the callback parameter >>>> (you need to specify it), this will force rails to interpret the >>>> request as GET. for example, a RESTful URL works like so: >>>> >>>> user_url @user, :_method => :get >>>> >>>> >>>> On Fri, Sep 5, 2008 at 12:50 AM, Allen Walker >>>> wrote: >>>> >>>>> Yeah I'm not really sure. Apparently I need to immerse myself in >>>>> REST wrt >>>>> Rails. I'm pretty confused I guess. Running "rake routes" can cause >>>>> additional confusion sometimes. >>>>> >>>>> The thing to understand with the problem here is that the URL has >>>>> to accept >>>>> POST requests. /controller/new does by the REST definition... and >>>>> therefore >>>>> will work with the fb:comments tag. /controller by itself won't >>>>> accept a >>>>> POST and therefore won't work with the fb:comments tag. >>>>> >>>>> Right now I'm so confused that any page I put a fb:comments or >>>>> fb:board on I >>>>> make sure is /controller/new . But that is not really ideal. >>>>> >>>>> Ken Schroeder wrote: >>>>> >>>>>> Been following along with your thread here as I've had the same >>>>>> exact >>>>>> issue. So what did you add in your routes for your >>>>>> /article/8 example which I assume is the show path. >>>>>> >>>>>> Using Mikes example of map.fancy_name 'fancy_path/:id' .... >>>>>> didn't quite >>>>>> undetstand how to input that correctly. >>>>>> >>>>>> On Thu, Sep 4, 2008 at 6:26 PM, Allen Walker >>>>> > wrote: >>>>>> >>>>>> That's what I figured and that makes perfect sense. Thanks for >>>>>> clearing that up. you might want to put this in your book btw. >>>>>> >>>>>> Best regards >>>>>> >>>>>> >>>>>> Mike Mangino wrote: >>>>>> >>>>>> Actually, you can >>>>>> >>>>>> map.fancy_name 'fancy_path/:id' .... >>>>>> >>>>>> Your problems were caused by Facebook sending a POST request >>>>>> to a URL that doesn't support posts. When they try to do >>>>>> that, >>>>>> your application returns an error and they cancel the >>>>>> posting. >>>>>> By creating a route by hand, you are decoupling it from the >>>>>> HTTP method used. >>>>>> >>>>>> Mike >>>>>> >>>>>> On Sep 4, 2008, at 6:16 PM, Allen Walker wrote: >>>>>> >>>>>> Also even though this works, i have urls that are dynamic >>>>>> , i.e. /articles/8 for example and want comments on those >>>>>> pages. That doesn't work. And I can't hardcode a route >>>>>> for >>>>>> a dynamic route that I know of really. >>>>>> >>>>>> Mike Mangino wrote: >>>>>> >>>>>> Try creating a route just for that page, i.e. >>>>>> >>>>>> route.discussion_board 'discussion', >>>>>> :controller=>"home", :action=>"index" >>>>>> >>>>>> Then, go to >>>>>> http://apps.new.facebook.com/myapp/discussion and see >>>>>> if that works. >>>>>> >>>>>> I struggled like mad to get this to work the first >>>>>> time too. I wish I could remember the eventual fix. >>>>>> >>>>>> Mike >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Facebooker-talk mailing list >>>>>> Facebooker-talk at rubyforge.org >>>>>> >>>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>>> >>>>>> >>>>>> -- Mike Mangino >>>>>> http://www.elevatedrails.com >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Facebooker-talk mailing list >>>>>> Facebooker-talk at rubyforge.org >>>>>> >>>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>>> >>>>>> >>>>>> >>>>> _______________________________________________ >>>>> Facebooker-talk mailing list >>>>> Facebooker-talk at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>> >>>>> >>> >>> >> >> > > From auswalk at gmail.com Wed Sep 10 03:06:08 2008 From: auswalk at gmail.com (Allen Walker) Date: Wed, 10 Sep 2008 02:06:08 -0500 Subject: [Facebooker-talk] validators posting to facebook_messages? Message-ID: <48C771E0.1080809@gmail.com> I have some validation going on in a model class. When I submit and a validator returns false, for some reason nothing is being populated into flash[:error] or flash[:notice]. It returns me back to the form_for (and it adds some divs in the html indicating an error with the associated field) but no actual error messages. I have <%= facebook_messages %> in my layout. Anyone having issues with this and or have this working? thanks From auswalk at gmail.com Wed Sep 10 03:24:41 2008 From: auswalk at gmail.com (Allen Walker) Date: Wed, 10 Sep 2008 02:24:41 -0500 Subject: [Facebooker-talk] validators posting to facebook_messages? In-Reply-To: <48C771E0.1080809@gmail.com> References: <48C771E0.1080809@gmail.com> Message-ID: <48C77639.6020906@gmail.com> Nevermind. I'm a rookie. I put in: <%= error_messages_for 'article' %> and it works. I guess I thought that was somehow done automatically. Allen Walker wrote: > I have some validation going on in a model class. When I submit and a > validator returns false, for some reason nothing is being populated > into flash[:error] or flash[:notice]. It returns me back to the > form_for (and it adds some divs in the html indicating an error with > the associated field) but no actual error messages. I have <%= > facebook_messages %> in my layout. > > Anyone having issues with this and or have this working? > > thanks > > From lee at crossbonesystems.com Wed Sep 10 07:10:09 2008 From: lee at crossbonesystems.com (Lee Mallabone) Date: Wed, 10 Sep 2008 12:10:09 +0100 Subject: [Facebooker-talk] errors Message-ID: Hi all, I've had a couple of issues and was hoping someone might be able to offer some advice? 1. To get facebooker to work at all (on both 0.9.5 and the latest git version), I had to add the following lines to the init.rb file: require 'facebooker/rails/facebook_form_builder' require 'facebooker/rails/helpers' 2. I'm trying to use the form builder methods and I get the following error: ------------------------------------------ NameError in Lee#new Showing app/views/lee/new.rhtml where line #23 raised: undefined local variable or method `_erbout' for # Extracted source (around line #23): 23: <%= f.collection_typeahead :category, [[1,'hello'], [2,'goodbye'], [3,'grandad']], :first, :last %> 24: <%= f.buttons "Post Form", "Save For Later", "Cancel" %> 25: 26: <% end %> RAILS_ROOT: ./script/../config/.. Application Trace | Framework Trace | Full Trace /Users/lee/Code/rails/testapp1/vendor/plugins/facebooker/lib/facebooker/rails/facebook_form_builder.rb:30:in `build_shell' /Users/lee/Code/rails/testapp1/vendor/plugins/facebooker/lib/facebooker/rails/facebook_form_builder.rb:30:in `collection_typeahead' ... ------------------------------------------ Are these errors for known issues? Are there any workarounds? I get the same error when I try and use the normal collection_select method with facebook_form_for(). This issue is preventing me from creating useful forms with facebooker so if I need to provide any more info, please let me know. I'm running rails 1.2.6 on ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]. Kind regards, Lee. From mmangino at elevatedrails.com Wed Sep 10 07:31:27 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 10 Sep 2008 07:31:27 -0400 Subject: [Facebooker-talk] fb_comments and fb_board not working In-Reply-To: <48C743E2.3090207@gmail.com> References: <48BF6608.5020107@gmail.com> <93B0BE49-446F-4A50-8C0D-AFD5689CC250@elevatedrails.com> <48C05301.7080206@gmail.com> <48C05E4D.2030106@gmail.com> <55190A2D-BD8F-4F60-B5D3-E4BBF62A0699@elevatedrails.com> <48C060A4.70905@gmail.com> <48C0C891.5070908@gmail.com> <48C741A6.5070700@gmail.com> <48C74292.8020700@gmail.com> <48C743E2.3090207@gmail.com> Message-ID: There is no HTTP support for the PUT or DELETE verbs, so Rails uses _method=PUT or _method=DELETE as a workaround. When rails receives a POST request, it looks for a _method parameter. If one exists, it uses the verb specified in that parameter for routing. Mike On Sep 9, 2008, at 11:49 PM, Allen Walker wrote: > Sorry for the multiple posts.. > > Finally if you wish you CAN use the helper: > > <%=fb_comments("comments_for_comment_lesson", true, true, > 20,:showform => true, :title => "Comment Lesson > Comments", :callbackurl => url_for(:controller => > "home", :action=>"index", :only_path => false, :_method => :get)) %> > > Now can you explain to me why this works? You write some text into > the facebook generated comments form. It sends an HTTP POST . > My :controller=>"home" :action=>"index" has no rule for HTTP POSTS > that I see. I'm just really confused at to what exactly is going on > here. > > Allen Walker wrote: >> The following DOES work: >> >> "index", :only_path => false, :_method => :get) >> %>">some title >> >> Allen Walker wrote: >>> I tried the following it posts don't take: >>> >>> "index", :only_path => false, :conditions => >>> {:_method => :get}) %>">some title >>> >>> Jonathan Otto wrote: >>>> Here is the exact code: >>>> >>>> some title >>>> >>>> On Mon, Sep 8, 2008 at 12:27 AM, Jonathan Otto >>> > wrote: >>>> >>>>> just add the _method parameter to your URL for the callback >>>>> parameter >>>>> (you need to specify it), this will force rails to interpret the >>>>> request as GET. for example, a RESTful URL works like so: >>>>> >>>>> user_url @user, :_method => :get >>>>> >>>>> >>>>> On Fri, Sep 5, 2008 at 12:50 AM, Allen Walker >>>>> wrote: >>>>> >>>>>> Yeah I'm not really sure. Apparently I need to immerse myself >>>>>> in REST wrt >>>>>> Rails. I'm pretty confused I guess. Running "rake routes" can >>>>>> cause >>>>>> additional confusion sometimes. >>>>>> >>>>>> The thing to understand with the problem here is that the URL >>>>>> has to accept >>>>>> POST requests. /controller/new does by the REST definition... >>>>>> and therefore >>>>>> will work with the fb:comments tag. /controller by itself >>>>>> won't accept a >>>>>> POST and therefore won't work with the fb:comments tag. >>>>>> >>>>>> Right now I'm so confused that any page I put a fb:comments or >>>>>> fb:board on I >>>>>> make sure is /controller/new . But that is not really ideal. >>>>>> >>>>>> Ken Schroeder wrote: >>>>>> >>>>>>> Been following along with your thread here as I've had the >>>>>>> same exact >>>>>>> issue. So what did you add in your routes for your >>>>>>> /article/8 example which I assume is the show path. >>>>>>> >>>>>>> Using Mikes example of map.fancy_name 'fancy_path/:id' .... >>>>>>> didn't quite >>>>>>> undetstand how to input that correctly. >>>>>>> >>>>>>> On Thu, Sep 4, 2008 at 6:26 PM, Allen Walker >>>>>> > wrote: >>>>>>> >>>>>>> That's what I figured and that makes perfect sense. Thanks for >>>>>>> clearing that up. you might want to put this in your book btw. >>>>>>> >>>>>>> Best regards >>>>>>> >>>>>>> >>>>>>> Mike Mangino wrote: >>>>>>> >>>>>>> Actually, you can >>>>>>> >>>>>>> map.fancy_name 'fancy_path/:id' .... >>>>>>> >>>>>>> Your problems were caused by Facebook sending a POST >>>>>>> request >>>>>>> to a URL that doesn't support posts. When they try to do >>>>>>> that, >>>>>>> your application returns an error and they cancel the >>>>>>> posting. >>>>>>> By creating a route by hand, you are decoupling it from >>>>>>> the >>>>>>> HTTP method used. >>>>>>> >>>>>>> Mike >>>>>>> >>>>>>> On Sep 4, 2008, at 6:16 PM, Allen Walker wrote: >>>>>>> >>>>>>> Also even though this works, i have urls that are >>>>>>> dynamic >>>>>>> , i.e. /articles/8 for example and want comments on >>>>>>> those >>>>>>> pages. That doesn't work. And I can't hardcode a >>>>>>> route for >>>>>>> a dynamic route that I know of really. >>>>>>> >>>>>>> Mike Mangino wrote: >>>>>>> >>>>>>> Try creating a route just for that page, i.e. >>>>>>> >>>>>>> route.discussion_board 'discussion', >>>>>>> :controller=>"home", :action=>"index" >>>>>>> >>>>>>> Then, go to >>>>>>> http://apps.new.facebook.com/myapp/discussion >>>>>>> and see >>>>>>> if that works. >>>>>>> >>>>>>> I struggled like mad to get this to work the first >>>>>>> time too. I wish I could remember the eventual >>>>>>> fix. >>>>>>> >>>>>>> Mike >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Facebooker-talk mailing list >>>>>>> Facebooker-talk at rubyforge.org >>>>>>> >>>>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>>>> >>>>>>> >>>>>>> -- Mike Mangino >>>>>>> http://www.elevatedrails.com >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Facebooker-talk mailing list >>>>>>> Facebooker-talk at rubyforge.org >>>>>> > >>>>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>>>> >>>>>>> >>>>>>> >>>>>> _______________________________________________ >>>>>> Facebooker-talk mailing list >>>>>> Facebooker-talk at rubyforge.org >>>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>>> >>>>>> >>>> >>>> >>> >>> >> >> > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From mmangino at elevatedrails.com Wed Sep 10 07:33:18 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 10 Sep 2008 07:33:18 -0400 Subject: [Facebooker-talk] errors In-Reply-To: References: Message-ID: <1574B9AA-FAE8-4B6B-9DD3-BA91A685E073@elevatedrails.com> What version of Rails are you using? There is a lot of ugly trickery involving _erbout that happens in view helpers. Maybe some of that has changed in new versions. Mike On Sep 10, 2008, at 7:10 AM, Lee Mallabone wrote: > Hi all, > > I've had a couple of issues and was hoping someone might be able to > offer some advice? > > 1. To get facebooker to work at all (on both 0.9.5 and the latest git > version), I had to add the following lines to the init.rb file: > > require 'facebooker/rails/facebook_form_builder' > require 'facebooker/rails/helpers' > > > 2. I'm trying to use the form builder methods and I get the > following error: > > ------------------------------------------ > NameError in Lee#new > > Showing app/views/lee/new.rhtml where line #23 raised: > > undefined local variable or method `_erbout' for > # > Extracted source (around line #23): > > 23: <%= f.collection_typeahead :category, [[1,'hello'], > [2,'goodbye'], [3,'grandad']], :first, :last %> > 24: <%= f.buttons "Post Form", "Save For Later", "Cancel" %> > 25: > 26: <% end %> > RAILS_ROOT: ./script/../config/.. > > Application Trace | Framework Trace | Full Trace > /Users/lee/Code/rails/testapp1/vendor/plugins/facebooker/lib/ > facebooker/rails/facebook_form_builder.rb:30:in > `build_shell' > /Users/lee/Code/rails/testapp1/vendor/plugins/facebooker/lib/ > facebooker/rails/facebook_form_builder.rb:30:in > `collection_typeahead' > ... > ------------------------------------------ > > Are these errors for known issues? Are there any workarounds? I get > the same error when I try and use the normal collection_select method > with facebook_form_for(). This issue is preventing me from creating > useful forms with facebooker so if I need to provide any more info, > please let me know. > > I'm running rails 1.2.6 on ruby 1.8.6 (2008-03-03 patchlevel 114) > [universal-darwin9.0]. > > Kind regards, > Lee. > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From lee at crossbonesystems.com Wed Sep 10 08:09:10 2008 From: lee at crossbonesystems.com (Lee Mallabone) Date: Wed, 10 Sep 2008 13:09:10 +0100 Subject: [Facebooker-talk] errors In-Reply-To: <1574B9AA-FAE8-4B6B-9DD3-BA91A685E073@elevatedrails.com> References: <1574B9AA-FAE8-4B6B-9DD3-BA91A685E073@elevatedrails.com> Message-ID: Hi Mike, I'm on rails 1.2.6, is that compatible with facebooker? Lee. 2008/9/10 Mike Mangino : > What version of Rails are you using? > > There is a lot of ugly trickery involving _erbout that happens in view > helpers. Maybe some of that has changed in new versions. > > Mike > > On Sep 10, 2008, at 7:10 AM, Lee Mallabone wrote: > >> Hi all, >> >> I've had a couple of issues and was hoping someone might be able to >> offer some advice? >> >> 1. To get facebooker to work at all (on both 0.9.5 and the latest git >> version), I had to add the following lines to the init.rb file: >> >> require 'facebooker/rails/facebook_form_builder' >> require 'facebooker/rails/helpers' >> >> >> 2. I'm trying to use the form builder methods and I get the following >> error: >> >> ------------------------------------------ >> NameError in Lee#new >> >> Showing app/views/lee/new.rhtml where line #23 raised: >> >> undefined local variable or method `_erbout' for >> # >> Extracted source (around line #23): >> >> 23: <%= f.collection_typeahead :category, [[1,'hello'], >> [2,'goodbye'], [3,'grandad']], :first, :last %> >> 24: <%= f.buttons "Post Form", "Save For Later", "Cancel" %> >> 25: >> 26: <% end %> >> RAILS_ROOT: ./script/../config/.. >> >> Application Trace | Framework Trace | Full Trace >> >> /Users/lee/Code/rails/testapp1/vendor/plugins/facebooker/lib/facebooker/rails/facebook_form_builder.rb:30:in >> `build_shell' >> >> /Users/lee/Code/rails/testapp1/vendor/plugins/facebooker/lib/facebooker/rails/facebook_form_builder.rb:30:in >> `collection_typeahead' >> ... >> ------------------------------------------ >> >> Are these errors for known issues? Are there any workarounds? I get >> the same error when I try and use the normal collection_select method >> with facebook_form_for(). This issue is preventing me from creating >> useful forms with facebooker so if I need to provide any more info, >> please let me know. >> >> I'm running rails 1.2.6 on ruby 1.8.6 (2008-03-03 patchlevel 114) >> [universal-darwin9.0]. >> >> Kind regards, >> Lee. >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com > > > > -- Lee Mallabone. Director, Crossbone Systems Ltd. http://www.crossbonesystems.com/ http://www.fonicmonkey.net/ http://CambridgeWebHeads.ning.com/ From mmangino at elevatedrails.com Wed Sep 10 08:58:39 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 10 Sep 2008 08:58:39 -0400 Subject: [Facebooker-talk] errors In-Reply-To: References: <1574B9AA-FAE8-4B6B-9DD3-BA91A685E073@elevatedrails.com> Message-ID: <8068A45E-67E8-4BB1-8068-D9A1087DC600@elevatedrails.com> We did support 1.2 in the past, but I haven't tested it in months. I'll take patches to keep it working on 1.2, but I don't plan on actively working to support anything beyond the last couple of Rails releases. Mike On Sep 10, 2008, at 8:09 AM, Lee Mallabone wrote: > Hi Mike, > > I'm on rails 1.2.6, is that compatible with facebooker? > > Lee. > > > 2008/9/10 Mike Mangino : >> What version of Rails are you using? >> >> There is a lot of ugly trickery involving _erbout that happens in >> view >> helpers. Maybe some of that has changed in new versions. >> >> Mike >> >> On Sep 10, 2008, at 7:10 AM, Lee Mallabone wrote: >> >>> Hi all, >>> >>> I've had a couple of issues and was hoping someone might be able to >>> offer some advice? >>> >>> 1. To get facebooker to work at all (on both 0.9.5 and the latest >>> git >>> version), I had to add the following lines to the init.rb file: >>> >>> require 'facebooker/rails/facebook_form_builder' >>> require 'facebooker/rails/helpers' >>> >>> >>> 2. I'm trying to use the form builder methods and I get the >>> following >>> error: >>> >>> ------------------------------------------ >>> NameError in Lee#new >>> >>> Showing app/views/lee/new.rhtml where line #23 raised: >>> >>> undefined local variable or method `_erbout' for >>> # >>> Extracted source (around line #23): >>> >>> 23: <%= f.collection_typeahead :category, [[1,'hello'], >>> [2,'goodbye'], [3,'grandad']], :first, :last %> >>> 24: <%= f.buttons "Post Form", "Save For Later", "Cancel" %> >>> 25: >>> 26: <% end %> >>> RAILS_ROOT: ./script/../config/.. >>> >>> Application Trace | Framework Trace | Full Trace >>> >>> /Users/lee/Code/rails/testapp1/vendor/plugins/facebooker/lib/ >>> facebooker/rails/facebook_form_builder.rb:30:in >>> `build_shell' >>> >>> /Users/lee/Code/rails/testapp1/vendor/plugins/facebooker/lib/ >>> facebooker/rails/facebook_form_builder.rb:30:in >>> `collection_typeahead' >>> ... >>> ------------------------------------------ >>> >>> Are these errors for known issues? Are there any workarounds? I get >>> the same error when I try and use the normal collection_select >>> method >>> with facebook_form_for(). This issue is preventing me from creating >>> useful forms with facebooker so if I need to provide any more info, >>> please let me know. >>> >>> I'm running rails 1.2.6 on ruby 1.8.6 (2008-03-03 patchlevel 114) >>> [universal-darwin9.0]. >>> >>> Kind regards, >>> Lee. >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> -- >> Mike Mangino >> http://www.elevatedrails.com >> >> >> >> > > > > -- > Lee Mallabone. > Director, Crossbone Systems Ltd. > > http://www.crossbonesystems.com/ > http://www.fonicmonkey.net/ > http://CambridgeWebHeads.ning.com/ -- Mike Mangino http://www.elevatedrails.com From wthomas989 at yahoo.com Wed Sep 10 10:00:02 2008 From: wthomas989 at yahoo.com (William Thomas) Date: Wed, 10 Sep 2008 07:00:02 -0700 (PDT) Subject: [Facebooker-talk] FB Canvas Controller Message-ID: <494340.94438.qm@web58705.mail.re1.yahoo.com> I'm trying to figure out how to make only a single controller and/or view be a facebook application. My goal is that I have a normal site, but at some point want to let the user add my application to FB. I used www.ping.fm a few days ago and they do this perfectly with Facebook. Any tips? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Wed Sep 10 10:31:20 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 10 Sep 2008 10:31:20 -0400 Subject: [Facebooker-talk] FB Canvas Controller In-Reply-To: <494340.94438.qm@web58705.mail.re1.yahoo.com> References: <494340.94438.qm@web58705.mail.re1.yahoo.com> Message-ID: <9066455B-7CB7-4002-AFA1-08DE921528CA@elevatedrails.com> Sure, use routing to only make one controller available through Facebook. You can use :conditions=>{:canvas=>true} to set a different default route for Facebook. Then, you should be okay as long as you only link to things you want the user to see. If you are super paranoid, you can add a filter around the rest of your controllers that stops the request if it is from a facebook canvas. Mike On Sep 10, 2008, at 10:00 AM, William Thomas wrote: > I'm trying to figure out how to make only a single controller and/or > view be a facebook application. My goal is that I have a normal > site, but at some point want to let the user add my application to > FB. I used www.ping.fm a few days ago and they do this perfectly > with Facebook. Any tips? > > Thanks! > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From zhao.lu.us at gmail.com Thu Sep 11 01:45:14 2008 From: zhao.lu.us at gmail.com (Zhao Lu) Date: Wed, 10 Sep 2008 22:45:14 -0700 Subject: [Facebooker-talk] facebook_form_for + a little ajax? Message-ID: Hello Everyone, I'm using a facebook_form_for which is bound to a model. In the form I have a form.select which is populated with an array of the names of images. Whenever I change the selection I'd like to display the image on the same page. I tried to change form.select to select_tag but that doesn't seem to play well with facebook_form_for. I'm pretty confused as to how to approach this. Any suggestion would be appreciated. -- Zhao From mmangino at elevatedrails.com Thu Sep 11 08:30:52 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Thu, 11 Sep 2008 08:30:52 -0400 Subject: [Facebooker-talk] facebook_form_for + a little ajax? In-Reply-To: References: Message-ID: Are you calling form.select_tag? That won't work. select_tag is not a method on the form builder (this is true any time you use form_for in rails) You can do form.text select_tag... to wrap a normal select inside a facebook form. Mike On Sep 11, 2008, at 1:45 AM, Zhao Lu wrote: > Hello Everyone, > > I'm using a facebook_form_for which is bound to a model. In the form > I have a form.select which is populated with an array of the names of > images. > Whenever I change the selection I'd like to display the image on the > same page. I tried to change form.select to select_tag but that > doesn't seem to play well with facebook_form_for. I'm pretty confused > as to how to approach this. Any suggestion would be appreciated. > > -- > Zhao > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From zhao.lu.us at gmail.com Thu Sep 11 15:06:13 2008 From: zhao.lu.us at gmail.com (Zhao Lu) Date: Thu, 11 Sep 2008 12:06:13 -0700 Subject: [Facebooker-talk] facebook_form_for + a little ajax? In-Reply-To: References: Message-ID: Thanks for your answer Mike. I was calling select_tag by itself without the wrapping, which is indeed what I need to do. Now I have passed that having some problem with getting hold of a ruby class I defined from javascript. I can't seem to find an example online. Here's my code:

 

<% facebook_form_for :facebook_gift, FacebookGift.new, :url => facebook_gifts_path do |f| %> <%= @gift_catalog = GiftCatalog.find(:all, :order => "name").map { |gc| [gc.resource.file_name, gc.id]} f.text select_tag(:gift_catalog_id, options_for_select(@gift_catalog), :onchange => "update_gift_display(this.getValue(), 'resource');") %> //more code here <%end%> I have some javascript on the same page: So what I'm trying to achieve is for user to select a gift_catalog_id, then I will get the url to the actual gift (which is linked to gift_catalog). But GiftCatalog is not available in the javascript function. I feel that I'm not on the right track for this. Any suggestion would be greatly appreciated. Zhao On Thu, Sep 11, 2008 at 5:30 AM, Mike Mangino wrote: > Are you calling form.select_tag? That won't work. select_tag is not a method > on the form builder (this is true any time you use form_for in rails) > > You can do form.text select_tag... to wrap a normal select inside a facebook > form. > > Mike > On Sep 11, 2008, at 1:45 AM, Zhao Lu wrote: > >> Hello Everyone, >> >> I'm using a facebook_form_for which is bound to a model. In the form >> I have a form.select which is populated with an array of the names of >> images. >> Whenever I change the selection I'd like to display the image on the >> same page. I tried to change form.select to select_tag but that >> doesn't seem to play well with facebook_form_for. I'm pretty confused >> as to how to approach this. Any suggestion would be appreciated. >> >> -- >> Zhao >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com > > > > -- Zhao From mmangino at elevatedrails.com Thu Sep 11 17:13:44 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Thu, 11 Sep 2008 17:13:44 -0400 Subject: [Facebooker-talk] facebook_form_for + a little ajax? In-Reply-To: References: Message-ID: <24273F3B-53E6-4D5B-A21C-614FF429792A@elevatedrails.com> I think you're mixing javascript and ruby: uri = GiftCatalog.find(gc_id).resource.resource_uri That's Ruby, right? You'll need to either use ajax to get that data or store it in the page somewhere. Maybe you could keep an array that maps between gc_id values and their URLs. I often will prototype my ajax stuff outside of Facebook. It's easier to debug that way. Once it's working I convert it to Facebook. Mike On Sep 11, 2008, at 3:06 PM, Zhao Lu wrote: > Thanks for your answer Mike. I was calling select_tag by itself > without the wrapping, > which is indeed what I need to do. Now I have passed that having some > problem with > getting hold of a ruby class I defined from javascript. I can't seem > to find an example > online. Here's my code: > >

 

> <% facebook_form_for :facebook_gift, FacebookGift.new, :url => > facebook_gifts_path do |f| %> > <%= > @gift_catalog = GiftCatalog.find(:all, :order => "name").map { |gc| > [gc.resource.file_name, gc.id]} > f.text select_tag(:gift_catalog_id, > options_for_select(@gift_catalog), :onchange => > "update_gift_display(this.getValue(), 'resource');") > %> > //more code here > <%end%> > > I have some javascript on the same page: > > > > So what I'm trying to achieve is for user to select a gift_catalog_id, > then I will get the url to > the actual gift (which is linked to gift_catalog). But GiftCatalog is > not available in the javascript function. > I feel that I'm not on the right track for this. Any suggestion would > be greatly appreciated. > > Zhao > > On Thu, Sep 11, 2008 at 5:30 AM, Mike Mangino > wrote: >> Are you calling form.select_tag? That won't work. select_tag is not >> a method >> on the form builder (this is true any time you use form_for in rails) >> >> You can do form.text select_tag... to wrap a normal select inside a >> facebook >> form. >> >> Mike >> On Sep 11, 2008, at 1:45 AM, Zhao Lu wrote: >> >>> Hello Everyone, >>> >>> I'm using a facebook_form_for which is bound to a model. In the >>> form >>> I have a form.select which is populated with an array of the names >>> of >>> images. >>> Whenever I change the selection I'd like to display the image on the >>> same page. I tried to change form.select to select_tag but that >>> doesn't seem to play well with facebook_form_for. I'm pretty >>> confused >>> as to how to approach this. Any suggestion would be appreciated. >>> >>> -- >>> Zhao >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> -- >> Mike Mangino >> http://www.elevatedrails.com >> >> >> >> > > > > -- > Zhao -- Mike Mangino http://www.elevatedrails.com From zhao.lu.us at gmail.com Thu Sep 11 17:47:34 2008 From: zhao.lu.us at gmail.com (Zhao Lu) Date: Thu, 11 Sep 2008 14:47:34 -0700 Subject: [Facebooker-talk] facebook_form_for + a little ajax? In-Reply-To: <24273F3B-53E6-4D5B-A21C-614FF429792A@elevatedrails.com> References: <24273F3B-53E6-4D5B-A21C-614FF429792A@elevatedrails.com> Message-ID: Yep I was mixing them without thinking about it! I guess I'm getting confused reading on Prototype/Facebooker all at once. I think I can go either way, AJax or store it somewhere. It sounds storing it in an array as you have suggested is easier. But I'll have to store it in a ruby variable and I have to access to it (or at least I don't know how to access it) from Javascript. In case I'm not being articulate enough, this is what I mean: I create this array in my form: @rs_array = GiftCatalog.find(:all, :order => "name").map { |gc| [gc.resource.resource_uri, gc.id]} Then in my javascript function I pass in gc.id, cause that's what's being selected in the drop-down. Now how do you get the resource_uri that's corresponding to the gc.id of @rs_array? Zhao On Thu, Sep 11, 2008 at 2:13 PM, Mike Mangino wrote: > I think you're mixing javascript and ruby: > > uri = GiftCatalog.find(gc_id).resource.resource_uri > > That's Ruby, right? > > You'll need to either use ajax to get that data or store it in the page > somewhere. Maybe you could keep an array that maps between gc_id values and > their URLs. > > I often will prototype my ajax stuff outside of Facebook. It's easier to > debug that way. Once it's working I convert it to Facebook. > > Mike > On Sep 11, 2008, at 3:06 PM, Zhao Lu wrote: > >> Thanks for your answer Mike. I was calling select_tag by itself >> without the wrapping, >> which is indeed what I need to do. Now I have passed that having some >> problem with >> getting hold of a ruby class I defined from javascript. I can't seem >> to find an example >> online. Here's my code: >> >>

 

>> <% facebook_form_for :facebook_gift, FacebookGift.new, :url => >> facebook_gifts_path do |f| %> >> <%= >> @gift_catalog = GiftCatalog.find(:all, :order => "name").map { |gc| >> [gc.resource.file_name, gc.id]} >> f.text select_tag(:gift_catalog_id, >> options_for_select(@gift_catalog), :onchange => >> "update_gift_display(this.getValue(), 'resource');") >> %> >> //more code here >> <%end%> >> >> I have some javascript on the same page: >> >> >> >> So what I'm trying to achieve is for user to select a gift_catalog_id, >> then I will get the url to >> the actual gift (which is linked to gift_catalog). But GiftCatalog is >> not available in the javascript function. >> I feel that I'm not on the right track for this. Any suggestion would >> be greatly appreciated. >> >> Zhao >> >> On Thu, Sep 11, 2008 at 5:30 AM, Mike Mangino >> wrote: >>> >>> Are you calling form.select_tag? That won't work. select_tag is not a >>> method >>> on the form builder (this is true any time you use form_for in rails) >>> >>> You can do form.text select_tag... to wrap a normal select inside a >>> facebook >>> form. >>> >>> Mike >>> On Sep 11, 2008, at 1:45 AM, Zhao Lu wrote: >>> >>>> Hello Everyone, >>>> >>>> I'm using a facebook_form_for which is bound to a model. In the form >>>> I have a form.select which is populated with an array of the names of >>>> images. >>>> Whenever I change the selection I'd like to display the image on the >>>> same page. I tried to change form.select to select_tag but that >>>> doesn't seem to play well with facebook_form_for. I'm pretty confused >>>> as to how to approach this. Any suggestion would be appreciated. >>>> >>>> -- >>>> Zhao >>>> _______________________________________________ >>>> Facebooker-talk mailing list >>>> Facebooker-talk at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >>> -- >>> Mike Mangino >>> http://www.elevatedrails.com >>> >>> >>> >>> >> >> >> >> -- >> Zhao > > -- > Mike Mangino > http://www.elevatedrails.com > > > > -- Zhao From mmangino at elevatedrails.com Thu Sep 11 18:20:48 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Thu, 11 Sep 2008 18:20:48 -0400 Subject: [Facebooker-talk] facebook_form_for + a little ajax? In-Reply-To: References: <24273F3B-53E6-4D5B-A21C-614FF429792A@elevatedrails.com> Message-ID: <9F158A38-08FE-453F-AF7E-7C2FD8C35300@elevatedrails.com> You'll actually have to store it in a javascript variable. You can do something like: In your controller: @gift_image_hash = {} GiftCatalog.find(:all).each {|g| @gift_image_hash[g.id] = g.resource.resource_url} In your view: Then, your function can just be: function update_gift_display(gc_id, update_widget) { $(update_widget).setTextValue(gift_mapping[gc_id]); } You'll probably need to adjust the setTextValue call to something else if you want to change an image src, but that's the general idea. Mike On Sep 11, 2008, at 5:47 PM, Zhao Lu wrote: > Yep I was mixing them without thinking about it! I guess I'm getting > confused reading on Prototype/Facebooker all at once. I think I can > go either way, AJax or store it somewhere. It sounds storing it in an > array as you have suggested is easier. But I'll have to store it in a > ruby variable and I have to access to it (or at least I don't know how > to access it) from Javascript. > > In case I'm not being articulate enough, this is what I mean: > I create this array in my form: > @rs_array = GiftCatalog.find(:all, :order => "name").map { |gc| > [gc.resource.resource_uri, gc.id]} > > Then in my javascript function I pass in gc.id, cause that's what's > being selected in the drop-down. > Now how do you get the resource_uri that's corresponding to the gc.id > of @rs_array? > > Zhao > > On Thu, Sep 11, 2008 at 2:13 PM, Mike Mangino > wrote: >> I think you're mixing javascript and ruby: >> >> uri = GiftCatalog.find(gc_id).resource.resource_uri >> >> That's Ruby, right? >> >> You'll need to either use ajax to get that data or store it in the >> page >> somewhere. Maybe you could keep an array that maps between gc_id >> values and >> their URLs. >> >> I often will prototype my ajax stuff outside of Facebook. It's >> easier to >> debug that way. Once it's working I convert it to Facebook. >> >> Mike >> On Sep 11, 2008, at 3:06 PM, Zhao Lu wrote: >> >>> Thanks for your answer Mike. I was calling select_tag by itself >>> without the wrapping, >>> which is indeed what I need to do. Now I have passed that having >>> some >>> problem with >>> getting hold of a ruby class I defined from javascript. I can't >>> seem >>> to find an example >>> online. Here's my code: >>> >>>

 

>>> <% facebook_form_for :facebook_gift, FacebookGift.new, :url => >>> facebook_gifts_path do |f| %> >>> <%= >>> @gift_catalog = GiftCatalog.find(:all, :order => "name").map { |gc| >>> [gc.resource.file_name, gc.id]} >>> f.text select_tag(:gift_catalog_id, >>> options_for_select(@gift_catalog), :onchange => >>> "update_gift_display(this.getValue(), 'resource');") >>> %> >>> //more code here >>> <%end%> >>> >>> I have some javascript on the same page: >>> >>> >>> >>> So what I'm trying to achieve is for user to select a >>> gift_catalog_id, >>> then I will get the url to >>> the actual gift (which is linked to gift_catalog). But >>> GiftCatalog is >>> not available in the javascript function. >>> I feel that I'm not on the right track for this. Any suggestion >>> would >>> be greatly appreciated. >>> >>> Zhao >>> >>> On Thu, Sep 11, 2008 at 5:30 AM, Mike Mangino >>> wrote: >>>> >>>> Are you calling form.select_tag? That won't work. select_tag is >>>> not a >>>> method >>>> on the form builder (this is true any time you use form_for in >>>> rails) >>>> >>>> You can do form.text select_tag... to wrap a normal select inside a >>>> facebook >>>> form. >>>> >>>> Mike >>>> On Sep 11, 2008, at 1:45 AM, Zhao Lu wrote: >>>> >>>>> Hello Everyone, >>>>> >>>>> I'm using a facebook_form_for which is bound to a model. In the >>>>> form >>>>> I have a form.select which is populated with an array of the >>>>> names of >>>>> images. >>>>> Whenever I change the selection I'd like to display the image on >>>>> the >>>>> same page. I tried to change form.select to select_tag but that >>>>> doesn't seem to play well with facebook_form_for. I'm pretty >>>>> confused >>>>> as to how to approach this. Any suggestion would be appreciated. >>>>> >>>>> -- >>>>> Zhao >>>>> _______________________________________________ >>>>> Facebooker-talk mailing list >>>>> Facebooker-talk at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>> >>>> -- >>>> Mike Mangino >>>> http://www.elevatedrails.com >>>> >>>> >>>> >>>> >>> >>> >>> >>> -- >>> Zhao >> >> -- >> Mike Mangino >> http://www.elevatedrails.com >> >> >> >> > > > > -- > Zhao -- Mike Mangino http://www.elevatedrails.com From msummers at solarpowerme.com Thu Sep 11 20:01:36 2008 From: msummers at solarpowerme.com (Mike Summers) Date: Thu, 11 Sep 2008 19:01:36 -0500 Subject: [Facebooker-talk] FB issue? Message-ID: <48C9B160.2090503@solarpowerme.com> An HTML attachment was scrubbed... URL: From zhao.lu.us at gmail.com Fri Sep 12 01:59:56 2008 From: zhao.lu.us at gmail.com (Zhao Lu) Date: Thu, 11 Sep 2008 22:59:56 -0700 Subject: [Facebooker-talk] facebook_form_for + a little ajax? In-Reply-To: <9F158A38-08FE-453F-AF7E-7C2FD8C35300@elevatedrails.com> References: <24273F3B-53E6-4D5B-A21C-614FF429792A@elevatedrails.com> <9F158A38-08FE-453F-AF7E-7C2FD8C35300@elevatedrails.com> Message-ID: That's exactly what I was looking for. Thanks so much! On Thu, Sep 11, 2008 at 3:20 PM, Mike Mangino wrote: > You'll actually have to store it in a javascript variable. You can do > something like: > > In your controller: > > @gift_image_hash = {} > GiftCatalog.find(:all).each {|g| @gift_image_hash[g.id] = > g.resource.resource_url} > > In your view: > > > > > Then, your function can just be: > function update_gift_display(gc_id, update_widget) { > $(update_widget).setTextValue(gift_mapping[gc_id]); > } > > You'll probably need to adjust the setTextValue call to something else if > you want to change an image src, but that's the general idea. > > Mike > > On Sep 11, 2008, at 5:47 PM, Zhao Lu wrote: > >> Yep I was mixing them without thinking about it! I guess I'm getting >> confused reading on Prototype/Facebooker all at once. I think I can >> go either way, AJax or store it somewhere. It sounds storing it in an >> array as you have suggested is easier. But I'll have to store it in a >> ruby variable and I have to access to it (or at least I don't know how >> to access it) from Javascript. >> >> In case I'm not being articulate enough, this is what I mean: >> I create this array in my form: >> @rs_array = GiftCatalog.find(:all, :order => "name").map { |gc| >> [gc.resource.resource_uri, gc.id]} >> >> Then in my javascript function I pass in gc.id, cause that's what's >> being selected in the drop-down. >> Now how do you get the resource_uri that's corresponding to the gc.id >> of @rs_array? >> >> Zhao >> >> On Thu, Sep 11, 2008 at 2:13 PM, Mike Mangino >> wrote: >>> >>> I think you're mixing javascript and ruby: >>> >>> uri = GiftCatalog.find(gc_id).resource.resource_uri >>> >>> That's Ruby, right? >>> >>> You'll need to either use ajax to get that data or store it in the page >>> somewhere. Maybe you could keep an array that maps between gc_id values >>> and >>> their URLs. >>> >>> I often will prototype my ajax stuff outside of Facebook. It's easier to >>> debug that way. Once it's working I convert it to Facebook. >>> >>> Mike >>> On Sep 11, 2008, at 3:06 PM, Zhao Lu wrote: >>> >>>> Thanks for your answer Mike. I was calling select_tag by itself >>>> without the wrapping, >>>> which is indeed what I need to do. Now I have passed that having some >>>> problem with >>>> getting hold of a ruby class I defined from javascript. I can't seem >>>> to find an example >>>> online. Here's my code: >>>> >>>>

 

>>>> <% facebook_form_for :facebook_gift, FacebookGift.new, :url => >>>> facebook_gifts_path do |f| %> >>>> <%= >>>> @gift_catalog = GiftCatalog.find(:all, :order => "name").map { |gc| >>>> [gc.resource.file_name, gc.id]} >>>> f.text select_tag(:gift_catalog_id, >>>> options_for_select(@gift_catalog), :onchange => >>>> "update_gift_display(this.getValue(), 'resource');") >>>> %> >>>> //more code here >>>> <%end%> >>>> >>>> I have some javascript on the same page: >>>> >>>> >>>> >>>> So what I'm trying to achieve is for user to select a gift_catalog_id, >>>> then I will get the url to >>>> the actual gift (which is linked to gift_catalog). But GiftCatalog is >>>> not available in the javascript function. >>>> I feel that I'm not on the right track for this. Any suggestion would >>>> be greatly appreciated. >>>> >>>> Zhao >>>> >>>> On Thu, Sep 11, 2008 at 5:30 AM, Mike Mangino >>>> wrote: >>>>> >>>>> Are you calling form.select_tag? That won't work. select_tag is not a >>>>> method >>>>> on the form builder (this is true any time you use form_for in rails) >>>>> >>>>> You can do form.text select_tag... to wrap a normal select inside a >>>>> facebook >>>>> form. >>>>> >>>>> Mike >>>>> On Sep 11, 2008, at 1:45 AM, Zhao Lu wrote: >>>>> >>>>>> Hello Everyone, >>>>>> >>>>>> I'm using a facebook_form_for which is bound to a model. In the form >>>>>> I have a form.select which is populated with an array of the names of >>>>>> images. >>>>>> Whenever I change the selection I'd like to display the image on the >>>>>> same page. I tried to change form.select to select_tag but that >>>>>> doesn't seem to play well with facebook_form_for. I'm pretty confused >>>>>> as to how to approach this. Any suggestion would be appreciated. >>>>>> >>>>>> -- >>>>>> Zhao >>>>>> _______________________________________________ >>>>>> Facebooker-talk mailing list >>>>>> Facebooker-talk at rubyforge.org >>>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>> >>>>> -- >>>>> Mike Mangino >>>>> http://www.elevatedrails.com >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>>> >>>> -- >>>> Zhao >>> >>> -- >>> Mike Mangino >>> http://www.elevatedrails.com >>> >>> >>> >>> >> >> >> >> -- >> Zhao > > -- > Mike Mangino > http://www.elevatedrails.com > > > > -- Zhao From zhao.lu.us at gmail.com Fri Sep 12 15:03:46 2008 From: zhao.lu.us at gmail.com (Zhao Lu) Date: Fri, 12 Sep 2008 12:03:46 -0700 Subject: [Facebooker-talk] a small problem with invitation Message-ID: I juse this code to send an invitation, which receives fine by my friend: <% content_for("invite_message") do %> Send gifts to your friends. <%= fb_req_choice("Send gift!", new_facebook_gift_path(:canvas=>true))%> <% end %> <% fb_request_form("GiftToPhone","invite_message", invitations_path) do %> <%= fb_multi_friend_selector( "Invite your friends to send gifts with GiftToPone.")%>
<% end %> However, when they click on the "Send gift!" button, instead of going to apps.new.facebook.com/new_facebook_gift_path, it goes to www.new.facebook.com/new_facebook_gift_path. I'm not sure how to for the redirect go from www to apps. What am I missing here? Thanks, Zhao -- Zhao From mmangino at elevatedrails.com Fri Sep 12 15:27:01 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Fri, 12 Sep 2008 15:27:01 -0400 Subject: [Facebooker-talk] a small problem with invitation In-Reply-To: References: Message-ID: <53B0365B-6D44-4C5E-A6BD-17B332A42152@elevatedrails.com> You need to use _url on your links so that they include the host. I know that because of the post-it on my monitor that tells me to check that first :) It's a constant pain for me. Mike On Sep 12, 2008, at 3:03 PM, Zhao Lu wrote: > I juse this code to send an invitation, which receives fine by my > friend: > > <% content_for("invite_message") do %> > Send gifts to your friends. > <%= fb_req_choice("Send gift!", > new_facebook_gift_path(:canvas=>true))%> > <% end %> > <% fb_request_form("GiftToPhone","invite_message", invitations_path) > do %> > <%= fb_multi_friend_selector( > "Invite your friends to send gifts with GiftToPone.")%> >
> <% end %> > > However, when they click on the "Send gift!" button, instead of going > to apps.new.facebook.com/new_facebook_gift_path, it goes to > www.new.facebook.com/new_facebook_gift_path. I'm not sure how to for > the redirect go from www to apps. What am I missing here? > > Thanks, > > Zhao > > -- > Zhao > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From zhao.lu.us at gmail.com Fri Sep 12 16:38:17 2008 From: zhao.lu.us at gmail.com (Zhao Lu) Date: Fri, 12 Sep 2008 13:38:17 -0700 Subject: [Facebooker-talk] a small problem with invitation In-Reply-To: <53B0365B-6D44-4C5E-A6BD-17B332A42152@elevatedrails.com> References: <53B0365B-6D44-4C5E-A6BD-17B332A42152@elevatedrails.com> Message-ID: Mike, Thanks for the tip! Now I remember you saying that earlier. Maybe I miss that from the book. The karate poke code can be updated to reflect that too. Zhao On Fri, Sep 12, 2008 at 12:27 PM, Mike Mangino wrote: > You need to use _url on your links so that they include the host. > > I know that because of the post-it on my monitor that tells me to check that > first :) > > It's a constant pain for me. > > Mike > > On Sep 12, 2008, at 3:03 PM, Zhao Lu wrote: > >> I juse this code to send an invitation, which receives fine by my friend: >> >> <% content_for("invite_message") do %> >> Send gifts to your friends. >> <%= fb_req_choice("Send gift!", >> new_facebook_gift_path(:canvas=>true))%> >> <% end %> >> <% fb_request_form("GiftToPhone","invite_message", invitations_path) do %> >> <%= fb_multi_friend_selector( >> "Invite your friends to send gifts with GiftToPone.")%> >>
>> <% end %> >> >> However, when they click on the "Send gift!" button, instead of going >> to apps.new.facebook.com/new_facebook_gift_path, it goes to >> www.new.facebook.com/new_facebook_gift_path. I'm not sure how to for >> the redirect go from www to apps. What am I missing here? >> >> Thanks, >> >> Zhao >> >> -- >> Zhao >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com > > > > -- Zhao From marcdurden at gmail.com Fri Sep 12 17:18:02 2008 From: marcdurden at gmail.com (Marco Durden) Date: Fri, 12 Sep 2008 14:18:02 -0700 Subject: [Facebooker-talk] ArgumentError: Unknown key(s): dependant Message-ID: Hello, I came across an association error today with facebooker. class Cover < ActiveRecord::Base belongs_to :album end class Album < ActiveRecord::Base has_one :cover, :dependent => :destroy end At the console: >> Album.find :first ArgumentError: Unknown key(s): dependant from /home/marc/rails_projects/project/vendor/plugins/facebooker/lib/facebooker/rails/helpers.rb:589:in `assert_valid_keys' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations.rb:1187:in `create_has_one_reflection' from /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/associations.rb:727:in `has_one' from /home/marc/rails_projects/project/app/models/album.rb:2 from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:203:in `load_without_new_constant_marking' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:203:in `load_file' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:202:in `load_file' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:94:in `require_or_load' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:248:in `load_missing_constant' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:453:in `const_missing' from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:465:in `const_missing' from (irb):1 So what I did, I went to line:586 of vendor/plugins/facebooker/lib/facebooker/rails/helpers.rb:589:in `assert_valid_keys' 585 # We can allow css attributes. 586 FB_ALWAYS_VALID_OPTION_KEYS = [:class, :style] and changed it to : 586 FB_ALWAYS_VALID_OPTION_KEYS = [:class, :style, :dependant] 587 def assert_valid_keys(*valid_keys) 588 unknown_keys = keys - [valid_keys + FB_ALWAYS_VALID_OPTION_KEYS].flatten 589 raise(ArgumentError, "Unknown key(s): #{unknown_keys.join(", ")}") unless unknown_keys.empty? 590 end And now I no longer get the error. If anyone has come across this error, or if they know if this change will cause problems down the road, please let me know. Best -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Fri Sep 12 18:43:40 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Fri, 12 Sep 2008 18:43:40 -0400 Subject: [Facebooker-talk] a small problem with invitation In-Reply-To: References: <53B0365B-6D44-4C5E-A6BD-17B332A42152@elevatedrails.com> Message-ID: <31154D6E-7387-4C2A-A21F-FEEDFA11E7DE@elevatedrails.com> Yeah, the code for karate_poke needs to be re-pulled. The submitted code is drastically different than what you can download. I'll ping them about that. Mike On Sep 12, 2008, at 4:38 PM, Zhao Lu wrote: > Mike, > > Thanks for the tip! > > Now I remember you saying that earlier. Maybe I miss that from the > book. The karate poke code can be updated to reflect that too. > > Zhao > > On Fri, Sep 12, 2008 at 12:27 PM, Mike Mangino > wrote: >> You need to use _url on your links so that they include the host. >> >> I know that because of the post-it on my monitor that tells me to >> check that >> first :) >> >> It's a constant pain for me. >> >> Mike >> >> On Sep 12, 2008, at 3:03 PM, Zhao Lu wrote: >> >>> I juse this code to send an invitation, which receives fine by my >>> friend: >>> >>> <% content_for("invite_message") do %> >>> Send gifts to your friends. >>> <%= fb_req_choice("Send gift!", >>> new_facebook_gift_path(:canvas=>true))%> >>> <% end %> >>> <% fb_request_form("GiftToPhone","invite_message", >>> invitations_path) do %> >>> <%= fb_multi_friend_selector( >>> "Invite your friends to send gifts with GiftToPone.")%> >>>
>>> <% end %> >>> >>> However, when they click on the "Send gift!" button, instead of >>> going >>> to apps.new.facebook.com/new_facebook_gift_path, it goes to >>> www.new.facebook.com/new_facebook_gift_path. I'm not sure how to >>> for >>> the redirect go from www to apps. What am I missing here? >>> >>> Thanks, >>> >>> Zhao >>> >>> -- >>> Zhao >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> -- >> Mike Mangino >> http://www.elevatedrails.com >> >> >> >> > > > > -- > Zhao -- Mike Mangino http://www.elevatedrails.com From mmangino at elevatedrails.com Fri Sep 12 18:44:51 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Fri, 12 Sep 2008 18:44:51 -0400 Subject: [Facebooker-talk] ArgumentError: Unknown key(s): dependant In-Reply-To: References: Message-ID: <1AFF38A0-6E20-42FF-A766-9BBE002930B8@elevatedrails.com> Marco, check out the error message: ArgumentError: Unknown key(s): *****dependant***** It looks like this argument is spelled wrong in your model. I believe it is dependent with all Es. Mike On Sep 12, 2008, at 5:18 PM, Marco Durden wrote: > Hello, > > I came across an association error today with facebooker. > > class Cover < ActiveRecord::Base > belongs_to :album > end > > class Album < ActiveRecord::Base > has_one :cover, :dependent => :destroy > end > > At the console: > > >> Album.find :first > ArgumentError: Unknown key(s): dependant > from /home/marc/rails_projects/project/vendor/plugins/ > facebooker/lib/facebooker/rails/helpers.rb:589:in `assert_valid_keys' > from /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/ > active_record/associations.rb:1187:in `create_has_one_reflection' > from /usr/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/ > active_record/associations.rb:727:in `has_one' > from /home/marc/rails_projects/project/app/models/album.rb:2 > from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ > active_support/dependencies.rb:203:in > `load_without_new_constant_marking' > from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ > active_support/dependencies.rb:203:in `load_file' > from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ > active_support/dependencies.rb:342:in `new_constants_in' > from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ > active_support/dependencies.rb:202:in `load_file' > from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ > active_support/dependencies.rb:94:in `require_or_load' > from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ > active_support/dependencies.rb:248:in `load_missing_constant' > from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ > active_support/dependencies.rb:453:in `const_missing' > from /usr/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/ > active_support/dependencies.rb:465:in `const_missing' > from (irb):1 > > > > So what I did, I went to line:586 of vendor/plugins/facebooker/lib/ > facebooker/rails/helpers.rb:589:in `assert_valid_keys' > > 585 # We can allow css attributes. > 586 FB_ALWAYS_VALID_OPTION_KEYS = [:class, :style] > > and changed it to : > > 586 FB_ALWAYS_VALID_OPTION_KEYS = [:class, :style, :dependant] > 587 def assert_valid_keys(*valid_keys) > 588 unknown_keys = keys - [valid_keys + > FB_ALWAYS_VALID_OPTION_KEYS].flatten > 589 raise(ArgumentError, "Unknown key(s): #{unknown_keys.join(", > ")}") unless unknown_keys.empty? > 590 end > > > And now I no longer get the error. If anyone has come across this > error, or if they know if this change will cause problems down the > road, please let me know. > > Best > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From aeon2012 at gmail.com Fri Sep 12 19:34:36 2008 From: aeon2012 at gmail.com (Anthony C. Eufemio) Date: Fri, 12 Sep 2008 16:34:36 -0700 Subject: [Facebooker-talk] Breaking out fb:iframe after submit Message-ID: I have a Facebooker app that's configured to use FBML but I am using some custom forms with Javascript/jQuery so I have to put the new/edit form contents within an The problem is that once the user clicks submit it renders the result page inside the IFRAME. I need to be able to redirect the user to the main page which uses FBML properly. -------------- next part -------------- An HTML attachment was scrubbed... URL: From paul.covell at gmail.com Sun Sep 14 00:03:23 2008 From: paul.covell at gmail.com (Paul Covell) Date: Sun, 14 Sep 2008 13:03:23 +0900 Subject: [Facebooker-talk] SessionExpired when user removes application Authorization Message-ID: <202F6CD6-9C72-4BA0-AA29-A231491AA296@gmail.com> I've encountered the following situation during testing: 1. User is using application 2. User removes application Authorization 3. User returns to application and adds it 4. SessionExpired exception from Facebooker since the session[:facebook_session].session_key (and therefore facebook_session.session_key) is still using the old key I am using the standard cookie session store, but Facebooker is doing some magic to populate session and I'm not entirely sure where it's coming from. It can't be coming from the browser, since the user request goes to FB not to my application, so it must be stored by Facebooker either IN Facebook's data store or somewhere on my server (opting for the former since I can't find it anywhere else). I have created a workaround, but I feel that this must be a scenario that other people have tested -- any insight on this? I am posting my small modification/workaround below - basically I am inducing re- creation of the session if the stored session_key doesn't match the facebook_params['session_key'] (but only if facebook_params['session_key'] is actually set). As I'm somewhat new to Ruby, I'd also appreciate any Ruby-fied syntax advice. If this is something that should be modified in Facebooker, it seems like it might be better handled in the session access facebook_session_handling.rb so that the new key returns an empty session. I don't know enough Ruby magic yet to decode the behavior in that file, but if someone can point me in the right direction I'll test the changes. /// -> Changes to vendor/plugins/facebooker/lib/facebooker/ails/ controller.rb # Modified to add !diferent_session_set? call at the beginning of the chain def session_already_secured? !different_session_set? && (@facebook_session = session[:facebook_session]) && session[:facebook_session].secured? end # Added -- only different if both are set and they are set differently def different_session_set? fbs = session[:facebook_session] sk = facebook_params['session_key'] fbs && sk && fbs.session_key != sk end /// Cheers, -Paul From mmangino at elevatedrails.com Sun Sep 14 09:25:14 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Sun, 14 Sep 2008 09:25:14 -0400 Subject: [Facebooker-talk] SessionExpired when user removes application Authorization In-Reply-To: <202F6CD6-9C72-4BA0-AA29-A231491AA296@gmail.com> References: <202F6CD6-9C72-4BA0-AA29-A231491AA296@gmail.com> Message-ID: <2595BA58-7CD2-4D8B-9FF2-6E422C082CE1@elevatedrails.com> Are you using the latest version of Facebooker? I fixed a similar bug in the last couple of weeks. This has to do with Facebook and the fact that they keep cookies for a user even after they de-authorize the application. I'm hoping that the most recent version might fix this for you. Mike On Sep 14, 2008, at 12:03 AM, Paul Covell wrote: > I've encountered the following situation during testing: > > 1. User is using application > 2. User removes application Authorization > 3. User returns to application and adds it > 4. SessionExpired exception from Facebooker since the > session[:facebook_session].session_key (and therefore > facebook_session.session_key) is still using the old key > > I am using the standard cookie session store, but Facebooker is > doing some magic to populate session and I'm not entirely sure where > it's coming from. It can't be coming from the browser, since the > user request goes to FB not to my application, so it must be stored > by Facebooker either IN Facebook's data store or somewhere on my > server (opting for the former since I can't find it anywhere else). > > I have created a workaround, but I feel that this must be a scenario > that other people have tested -- any insight on this? I am posting > my small modification/workaround below - basically I am inducing re- > creation of the session if the stored session_key doesn't match the > facebook_params['session_key'] (but only if > facebook_params['session_key'] is actually set). As I'm somewhat > new to Ruby, I'd also appreciate any Ruby-fied syntax advice. > > If this is something that should be modified in Facebooker, it seems > like it might be better handled in the session access > facebook_session_handling.rb so that the new key returns an empty > session. I don't know enough Ruby magic yet to decode the behavior > in that file, but if someone can point me in the right direction > I'll test the changes. > > /// -> Changes to vendor/plugins/facebooker/lib/facebooker/ails/ > controller.rb > > # Modified to add !diferent_session_set? call at the beginning > of the chain > def session_already_secured? > !different_session_set? && (@facebook_session = > session[:facebook_session]) && session[:facebook_session].secured? > end > > # Added -- only different if both are set and they are set > differently > def different_session_set? > fbs = session[:facebook_session] > sk = facebook_params['session_key'] > > fbs && sk && fbs.session_key != sk > end > > /// > > Cheers, > -Paul > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From paul.covell at gmail.com Sun Sep 14 11:42:25 2008 From: paul.covell at gmail.com (Paul Covell) Date: Mon, 15 Sep 2008 00:42:25 +0900 Subject: [Facebooker-talk] SessionExpired when user removes application Authorization In-Reply-To: <2595BA58-7CD2-4D8B-9FF2-6E422C082CE1@elevatedrails.com> References: <202F6CD6-9C72-4BA0-AA29-A231491AA296@gmail.com> <2595BA58-7CD2-4D8B-9FF2-6E422C082CE1@elevatedrails.com> Message-ID: <1F5788B9-2F77-4021-99C2-D71AC2D49410@gmail.com> Hi, I upgraded to the head (ruby script/plugin install -e http://facebooker.rubyforge.org/svn/trunk/facebooker/) and I still see the same failure: Facebooker::Session::SessionExpired (Session key invalid or no longer valid): /vendor/plugins/facebooker/lib/facebooker/parser.rb:418:in `process' Reapplying the same patch fixes the problem in this version as well. If I understand how it works, the "session" cookie is actually set in FB and is therefore still valid by Rails standard logic -- so perhaps this is the appropriate way to catch this situation? The stored session value has become inconsistent with the outside world and should be updated by the [lowest level] code that understands that. -Paul On Sep 14, 2008, at 10:25 PM, Mike Mangino wrote: > Are you using the latest version of Facebooker? I fixed a similar > bug in the last couple of weeks. > > This has to do with Facebook and the fact that they keep cookies for > a user even after they de-authorize the application. I'm hoping that > the most recent version might fix this for you. > > Mike > > On Sep 14, 2008, at 12:03 AM, Paul Covell wrote: > >> I've encountered the following situation during testing: >> >> 1. User is using application >> 2. User removes application Authorization >> 3. User returns to application and adds it >> 4. SessionExpired exception from Facebooker since the >> session[:facebook_session].session_key (and therefore >> facebook_session.session_key) is still using the old key >> >> I am using the standard cookie session store, but Facebooker is >> doing some magic to populate session and I'm not entirely sure >> where it's coming from. It can't be coming from the browser, since >> the user request goes to FB not to my application, so it must be >> stored by Facebooker either IN Facebook's data store or somewhere >> on my server (opting for the former since I can't find it anywhere >> else). >> >> I have created a workaround, but I feel that this must be a >> scenario that other people have tested -- any insight on this? I >> am posting my small modification/workaround below - basically I am >> inducing re-creation of the session if the stored session_key >> doesn't match the facebook_params['session_key'] (but only if >> facebook_params['session_key'] is actually set). As I'm somewhat >> new to Ruby, I'd also appreciate any Ruby-fied syntax advice. >> >> If this is something that should be modified in Facebooker, it >> seems like it might be better handled in the session access >> facebook_session_handling.rb so that the new key returns an empty >> session. I don't know enough Ruby magic yet to decode the behavior >> in that file, but if someone can point me in the right direction >> I'll test the changes. >> >> /// -> Changes to vendor/plugins/facebooker/lib/facebooker/ails/ >> controller.rb >> >> # Modified to add !diferent_session_set? call at the beginning >> of the chain >> def session_already_secured? >> !different_session_set? && (@facebook_session = >> session[:facebook_session]) && session[:facebook_session].secured? >> end >> >> # Added -- only different if both are set and they are set >> differently >> def different_session_set? >> fbs = session[:facebook_session] >> sk = facebook_params['session_key'] >> >> fbs && sk && fbs.session_key != sk >> end >> >> /// >> >> Cheers, >> -Paul >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com > > > From zhao.lu.us at gmail.com Sun Sep 14 12:28:21 2008 From: zhao.lu.us at gmail.com (Zhao Lu) Date: Sun, 14 Sep 2008 09:28:21 -0700 Subject: [Facebooker-talk] SessionExpired when user removes application Authorization In-Reply-To: <1F5788B9-2F77-4021-99C2-D71AC2D49410@gmail.com> References: <202F6CD6-9C72-4BA0-AA29-A231491AA296@gmail.com> <2595BA58-7CD2-4D8B-9FF2-6E422C082CE1@elevatedrails.com> <1F5788B9-2F77-4021-99C2-D71AC2D49410@gmail.com> Message-ID: Iu see you get code from svn but Facebooker code has been moved to github: Facebooker can be installed as a Rails plugin by: script/plugin install git://github.com/mmangino/facebooker.git There's more information on Facebooker's homepage on rubyforge. Zhao On Sun, Sep 14, 2008 at 8:42 AM, Paul Covell wrote: > Hi, I upgraded to the head (ruby script/plugin install -e > http://facebooker.rubyforge.org/svn/trunk/facebooker/) and I still see the > same failure: > > Facebooker::Session::SessionExpired (Session key invalid or no longer > valid): > /vendor/plugins/facebooker/lib/facebooker/parser.rb:418:in `process' > > Reapplying the same patch fixes the problem in this version as well. If I > understand how it works, the "session" cookie is actually set in FB and is > therefore still valid by Rails standard logic -- so perhaps this is the > appropriate way to catch this situation? The stored session value has > become inconsistent with the outside world and should be updated by the > [lowest level] code that understands that. > > -Paul > > > On Sep 14, 2008, at 10:25 PM, Mike Mangino wrote: > >> Are you using the latest version of Facebooker? I fixed a similar bug in >> the last couple of weeks. >> >> This has to do with Facebook and the fact that they keep cookies for a >> user even after they de-authorize the application. I'm hoping that the most >> recent version might fix this for you. >> >> Mike >> >> On Sep 14, 2008, at 12:03 AM, Paul Covell wrote: >> >>> I've encountered the following situation during testing: >>> >>> 1. User is using application >>> 2. User removes application Authorization >>> 3. User returns to application and adds it >>> 4. SessionExpired exception from Facebooker since the >>> session[:facebook_session].session_key (and therefore >>> facebook_session.session_key) is still using the old key >>> >>> I am using the standard cookie session store, but Facebooker is doing >>> some magic to populate session and I'm not entirely sure where it's coming >>> from. It can't be coming from the browser, since the user request goes to >>> FB not to my application, so it must be stored by Facebooker either IN >>> Facebook's data store or somewhere on my server (opting for the former since >>> I can't find it anywhere else). >>> >>> I have created a workaround, but I feel that this must be a scenario that >>> other people have tested -- any insight on this? I am posting my small >>> modification/workaround below - basically I am inducing re-creation of the >>> session if the stored session_key doesn't match the >>> facebook_params['session_key'] (but only if facebook_params['session_key'] >>> is actually set). As I'm somewhat new to Ruby, I'd also appreciate any >>> Ruby-fied syntax advice. >>> >>> If this is something that should be modified in Facebooker, it seems like >>> it might be better handled in the session access >>> facebook_session_handling.rb so that the new key returns an empty session. >>> I don't know enough Ruby magic yet to decode the behavior in that file, but >>> if someone can point me in the right direction I'll test the changes. >>> >>> /// -> Changes to >>> vendor/plugins/facebooker/lib/facebooker/ails/controller.rb >>> >>> # Modified to add !diferent_session_set? call at the beginning of the >>> chain >>> def session_already_secured? >>> !different_session_set? && (@facebook_session = >>> session[:facebook_session]) && session[:facebook_session].secured? >>> end >>> >>> # Added -- only different if both are set and they are set differently >>> def different_session_set? >>> fbs = session[:facebook_session] >>> sk = facebook_params['session_key'] >>> >>> fbs && sk && fbs.session_key != sk >>> end >>> >>> /// >>> >>> Cheers, >>> -Paul >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> -- >> Mike Mangino >> http://www.elevatedrails.com >> >> >> > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > -- Zhao From bjclark at scidept.com Sun Sep 14 12:28:58 2008 From: bjclark at scidept.com (BJ Clark) Date: Sun, 14 Sep 2008 10:28:58 -0600 Subject: [Facebooker-talk] SessionExpired when user removes application Authorization In-Reply-To: <202F6CD6-9C72-4BA0-AA29-A231491AA296@gmail.com> References: <202F6CD6-9C72-4BA0-AA29-A231491AA296@gmail.com> Message-ID: Paul, The way I handle this is to set up my Post-Remove URL and Post-Add Urls in your application settings. Then you need to mark the user as being removed or actually remove him, when they hit the post-remove url. And then you will treat him like a new user when he comes back and re- hits the Post-add url. Not that it's not a good idea to do what you're doing, that's a fine way to handle the problem also, IMO. Hope that helps, BJ Clark On Sep 13, 2008, at 10:03 PM, Paul Covell wrote: > I've encountered the following situation during testing: > > 1. User is using application > 2. User removes application Authorization > 3. User returns to application and adds it > 4. SessionExpired exception from Facebooker since the > session[:facebook_session].session_key (and therefore > facebook_session.session_key) is still using the old key > > I am using the standard cookie session store, but Facebooker is > doing some magic to populate session and I'm not entirely sure where > it's coming from. It can't be coming from the browser, since the > user request goes to FB not to my application, so it must be stored > by Facebooker either IN Facebook's data store or somewhere on my > server (opting for the former since I can't find it anywhere else). > > I have created a workaround, but I feel that this must be a scenario > that other people have tested -- any insight on this? I am posting > my small modification/workaround below - basically I am inducing re- > creation of the session if the stored session_key doesn't match the > facebook_params['session_key'] (but only if > facebook_params['session_key'] is actually set). As I'm somewhat > new to Ruby, I'd also appreciate any Ruby-fied syntax advice. > > If this is something that should be modified in Facebooker, it seems > like it might be better handled in the session access > facebook_session_handling.rb so that the new key returns an empty > session. I don't know enough Ruby magic yet to decode the behavior > in that file, but if someone can point me in the right direction > I'll test the changes. > > /// -> Changes to vendor/plugins/facebooker/lib/facebooker/ails/ > controller.rb > > # Modified to add !diferent_session_set? call at the beginning > of the chain > def session_already_secured? > !different_session_set? && (@facebook_session = > session[:facebook_session]) && session[:facebook_session].secured? > end > > # Added -- only different if both are set and they are set > differently > def different_session_set? > fbs = session[:facebook_session] > sk = facebook_params['session_key'] > > fbs && sk && fbs.session_key != sk > end > > /// > > Cheers, > -Paul > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From auswalk at gmail.com Sun Sep 14 19:28:53 2008 From: auswalk at gmail.com (Allen Walker) Date: Sun, 14 Sep 2008 18:28:53 -0500 Subject: [Facebooker-talk] fastcgi and facebook rails app? Message-ID: <48CD9E35.1000101@gmail.com> Unfortunately my host only has fastcgi unless I want to pay extra to have mongrel. Is there a way to run facebook apps given that fastcgi the server? Here's my facebooker.yml right now (which isn't working): development: api_key: xxx secret_key: xxx canvas_page_name: myapp callback_url: http://www.domain.com tunnel: public_host_username: public_host: public_port: 4007 local_port: 3000 From mmangino at elevatedrails.com Sun Sep 14 20:27:05 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Sun, 14 Sep 2008 20:27:05 -0400 Subject: [Facebooker-talk] fastcgi and facebook rails app? In-Reply-To: <48CD9E35.1000101@gmail.com> References: <48CD9E35.1000101@gmail.com> Message-ID: <87DF56D4-E271-4B4A-B812-5FEAB34EBB16@elevatedrails.com> What isn't working about it? FastCGI shouldn't make a difference that I can think of. Mike On Sep 14, 2008, at 7:28 PM, Allen Walker wrote: > Unfortunately my host only has fastcgi unless I want to pay extra to > have mongrel. Is there a way to run facebook apps given that fastcgi > the server? > > Here's my facebooker.yml right now (which isn't working): > > development: > api_key: xxx > secret_key: xxx > canvas_page_name: myapp > callback_url: http://www.domain.com > tunnel: > public_host_username: > public_host: > public_port: 4007 > local_port: 3000 > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From auswalk at gmail.com Sun Sep 14 20:41:47 2008 From: auswalk at gmail.com (Allen Walker) Date: Sun, 14 Sep 2008 19:41:47 -0500 Subject: [Facebooker-talk] fastcgi and facebook rails app? In-Reply-To: <87DF56D4-E271-4B4A-B812-5FEAB34EBB16@elevatedrails.com> References: <48CD9E35.1000101@gmail.com> <87DF56D4-E271-4B4A-B812-5FEAB34EBB16@elevatedrails.com> Message-ID: <48CDAF4B.3020000@gmail.com> For some crazy reason when I go to "apps.facebook.com/myapp" it's trying to display the standard "Welcome to Rails" default home page. I had it working fine using mongrel. Mike Mangino wrote: > What isn't working about it? FastCGI shouldn't make a difference that > I can think of. > > Mike > On Sep 14, 2008, at 7:28 PM, Allen Walker wrote: > >> Unfortunately my host only has fastcgi unless I want to pay extra to >> have mongrel. Is there a way to run facebook apps given that fastcgi >> the server? >> >> Here's my facebooker.yml right now (which isn't working): >> >> development: >> api_key: xxx >> secret_key: xxx >> canvas_page_name: myapp >> callback_url: http://www.domain.com >> tunnel: >> public_host_username: >> public_host: >> public_port: 4007 >> local_port: 3000 >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com > > > > From auswalk at gmail.com Sun Sep 14 20:58:38 2008 From: auswalk at gmail.com (Allen Walker) Date: Sun, 14 Sep 2008 19:58:38 -0500 Subject: [Facebooker-talk] fastcgi and facebook rails app? In-Reply-To: <8F24752A-CC12-47BC-95B1-7625A5E706B8@scidept.com> References: <48CD9E35.1000101@gmail.com> <87DF56D4-E271-4B4A-B812-5FEAB34EBB16@elevatedrails.com> <48CDAF4B.3020000@gmail.com> <8F24752A-CC12-47BC-95B1-7625A5E706B8@scidept.com> Message-ID: <48CDB33E.1090607@gmail.com> BINGO! I've been screwing with this for HOURS! thanks alot. BJ Clark wrote: > Try deleting public/index.html > > Most fastcgi setups are set to first check for a static html file > then default to the dynamic action. > > BJ > > > On Sep 14, 2008, at 6:41 PM, Allen Walker wrote: > >> For some crazy reason when I go to "apps.facebook.com/myapp" it's >> trying to display the standard "Welcome to Rails" default home page. >> >> I had it working fine using mongrel. >> >> Mike Mangino wrote: >>> What isn't working about it? FastCGI shouldn't make a difference >>> that I can think of. >>> >>> Mike >>> On Sep 14, 2008, at 7:28 PM, Allen Walker wrote: >>> >>>> Unfortunately my host only has fastcgi unless I want to pay extra >>>> to have mongrel. Is there a way to run facebook apps given that >>>> fastcgi the server? >>>> >>>> Here's my facebooker.yml right now (which isn't working): >>>> >>>> development: >>>> api_key: xxx >>>> secret_key: xxx >>>> canvas_page_name: myapp >>>> callback_url: http://www.domain.com >>>> tunnel: >>>> public_host_username: >>>> public_host: >>>> public_port: 4007 >>>> local_port: 3000 >>>> _______________________________________________ >>>> Facebooker-talk mailing list >>>> Facebooker-talk at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >>> -- >>> Mike Mangino >>> http://www.elevatedrails.com >>> >>> >>> >>> >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > From paul.covell at gmail.com Sun Sep 14 22:21:47 2008 From: paul.covell at gmail.com (Paul Covell) Date: Mon, 15 Sep 2008 11:21:47 +0900 Subject: [Facebooker-talk] SessionExpired when user removes application Authorization In-Reply-To: References: <202F6CD6-9C72-4BA0-AA29-A231491AA296@gmail.com> <2595BA58-7CD2-4D8B-9FF2-6E422C082CE1@elevatedrails.com> <1F5788B9-2F77-4021-99C2-D71AC2D49410@gmail.com> Message-ID: <7C9D60AB-8240-4700-B808-AA44620E84BC@gmail.com> Good, thanks. This does fix the problem. -Paul On Sep 15, 2008, at 1:28 AM, Zhao Lu wrote: > Iu see you get code from svn but Facebooker code has been moved to > github: > > Facebooker can be installed as a Rails plugin by: > > script/plugin install git://github.com/mmangino/facebooker.git > > There's more information on Facebooker's homepage on rubyforge. > > Zhao > > On Sun, Sep 14, 2008 at 8:42 AM, Paul Covell > wrote: >> Hi, I upgraded to the head (ruby script/plugin install -e >> http://facebooker.rubyforge.org/svn/trunk/facebooker/) and I still >> see the >> same failure: >> >> Facebooker::Session::SessionExpired (Session key invalid or no longer >> valid): >> /vendor/plugins/facebooker/lib/facebooker/parser.rb:418:in >> `process' >> >> Reapplying the same patch fixes the problem in this version as >> well. If I >> understand how it works, the "session" cookie is actually set in FB >> and is >> therefore still valid by Rails standard logic -- so perhaps this is >> the >> appropriate way to catch this situation? The stored session value >> has >> become inconsistent with the outside world and should be updated by >> the >> [lowest level] code that understands that. >> >> -Paul >> >> >> On Sep 14, 2008, at 10:25 PM, Mike Mangino wrote: >> >>> Are you using the latest version of Facebooker? I fixed a similar >>> bug in >>> the last couple of weeks. >>> >>> This has to do with Facebook and the fact that they keep cookies >>> for a >>> user even after they de-authorize the application. I'm hoping that >>> the most >>> recent version might fix this for you. >>> >>> Mike >>> >>> On Sep 14, 2008, at 12:03 AM, Paul Covell wrote: >>> >>>> I've encountered the following situation during testing: >>>> >>>> 1. User is using application >>>> 2. User removes application Authorization >>>> 3. User returns to application and adds it >>>> 4. SessionExpired exception from Facebooker since the >>>> session[:facebook_session].session_key (and therefore >>>> facebook_session.session_key) is still using the old key >>>> >>>> I am using the standard cookie session store, but Facebooker is >>>> doing >>>> some magic to populate session and I'm not entirely sure where >>>> it's coming >>>> from. It can't be coming from the browser, since the user >>>> request goes to >>>> FB not to my application, so it must be stored by Facebooker >>>> either IN >>>> Facebook's data store or somewhere on my server (opting for the >>>> former since >>>> I can't find it anywhere else). >>>> >>>> I have created a workaround, but I feel that this must be a >>>> scenario that >>>> other people have tested -- any insight on this? I am posting my >>>> small >>>> modification/workaround below - basically I am inducing re- >>>> creation of the >>>> session if the stored session_key doesn't match the >>>> facebook_params['session_key'] (but only if >>>> facebook_params['session_key'] >>>> is actually set). As I'm somewhat new to Ruby, I'd also >>>> appreciate any >>>> Ruby-fied syntax advice. >>>> >>>> If this is something that should be modified in Facebooker, it >>>> seems like >>>> it might be better handled in the session access >>>> facebook_session_handling.rb so that the new key returns an empty >>>> session. >>>> I don't know enough Ruby magic yet to decode the behavior in that >>>> file, but >>>> if someone can point me in the right direction I'll test the >>>> changes. >>>> >>>> /// -> Changes to >>>> vendor/plugins/facebooker/lib/facebooker/ails/controller.rb >>>> >>>> # Modified to add !diferent_session_set? call at the beginning >>>> of the >>>> chain >>>> def session_already_secured? >>>> !different_session_set? && (@facebook_session = >>>> session[:facebook_session]) && session[:facebook_session].secured? >>>> end >>>> >>>> # Added -- only different if both are set and they are set >>>> differently >>>> def different_session_set? >>>> fbs = session[:facebook_session] >>>> sk = facebook_params['session_key'] >>>> >>>> fbs && sk && fbs.session_key != sk >>>> end >>>> >>>> /// >>>> >>>> Cheers, >>>> -Paul >>>> _______________________________________________ >>>> Facebooker-talk mailing list >>>> Facebooker-talk at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >>> -- >>> Mike Mangino >>> http://www.elevatedrails.com >>> >>> >>> >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > > > > -- > Zhao From digidigo at gmail.com Sun Sep 14 23:08:27 2008 From: digidigo at gmail.com (David Clements) Date: Sun, 14 Sep 2008 21:08:27 -0600 Subject: [Facebooker-talk] fastcgi and facebook rails app? In-Reply-To: <48CDB33E.1090607@gmail.com> References: <48CD9E35.1000101@gmail.com> <87DF56D4-E271-4B4A-B812-5FEAB34EBB16@elevatedrails.com> <48CDAF4B.3020000@gmail.com> <8F24752A-CC12-47BC-95B1-7625A5E706B8@scidept.com> <48CDB33E.1090607@gmail.com> Message-ID: Also, make sure you don't have any "puts" statements in you code, mongrel is fine with this but it messes with FastCGI. Dave On Sun, Sep 14, 2008 at 6:58 PM, Allen Walker wrote: > BINGO! I've been screwing with this for HOURS! > > thanks alot. > > BJ Clark wrote: > >> Try deleting public/index.html >> >> Most fastcgi setups are set to first check for a static html file then >> default to the dynamic action. >> >> BJ >> >> >> >> On Sep 14, 2008, at 6:41 PM, Allen Walker wrote: >> >> For some crazy reason when I go to "apps.facebook.com/myapp" it's trying >>> to display the standard "Welcome to Rails" default home page. >>> >>> I had it working fine using mongrel. >>> >>> Mike Mangino wrote: >>> >>>> What isn't working about it? FastCGI shouldn't make a difference that I >>>> can think of. >>>> >>>> Mike >>>> On Sep 14, 2008, at 7:28 PM, Allen Walker wrote: >>>> >>>> Unfortunately my host only has fastcgi unless I want to pay extra to >>>>> have mongrel. Is there a way to run facebook apps given that fastcgi the >>>>> server? >>>>> >>>>> Here's my facebooker.yml right now (which isn't working): >>>>> >>>>> development: >>>>> api_key: xxx >>>>> secret_key: xxx >>>>> canvas_page_name: myapp >>>>> callback_url: http://www.domain.com >>>>> tunnel: >>>>> public_host_username: >>>>> public_host: >>>>> public_port: 4007 >>>>> local_port: 3000 >>>>> _______________________________________________ >>>>> Facebooker-talk mailing list >>>>> Facebooker-talk at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>> >>>> >>>> -- >>>> Mike Mangino >>>> http://www.elevatedrails.com >>>> >>>> >>>> >>>> >>>> >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >> >> >> > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wthomas989 at yahoo.com Tue Sep 16 16:53:11 2008 From: wthomas989 at yahoo.com (William Thomas) Date: Tue, 16 Sep 2008 13:53:11 -0700 (PDT) Subject: [Facebooker-talk] FB Canvas Controller In-Reply-To: <9066455B-7CB7-4002-AFA1-08DE921528CA@elevatedrails.com> Message-ID: <773709.17511.qm@web58703.mail.re1.yahoo.com> I'm having a terrible time figuring this out. I think I am missing something key to the entire workings of Facebooker. I've created a sample application to test things out and am failing miserably. When I try to access a controller that requires the app installed I am sent to facebook allowed to authorize the app and then get the message below. What I believe should happen is the facebook_aware/index.fbml.erb file should be displayed. " Error while loading page from facebookSandbox The URL http://localhost:3000/facebook_aware/?auth_token=[this is really the auth token]&installed=1 is not valid. There are still a few kinks Facebook and the makers of facebookSandbox are trying to iron out. We appreciate your patience as we try to fix these issues. Your problem has been logged - if it persists, please come back in a few days. Thanks! " here are what I believe are the relavent pieces of my app routes.rb: map.connect 'facebook_aware',:controller => "facebook_aware", :conditions => {:canvas => true} development: ? canvas_page_name: facebook_aware ? callback_url: http://localhost:3000/facebook_aware/ facebook_aware_controller.rb: class FacebookAwareController < ApplicationController ? ? before_filter :ensure_application_is_installed_by_facebook_user ? before_filter :ensure_authenticated_to_facebook ? before_filter :ensure_has_status_update, :only => [:add_status_update] ? ? def add_status_update ??? redirect_to :action => 'done' ? end ? ? end (map.root) index.html.erb: This is where I ask the user to "add" the facebook component <%= link_to "Use Facebook" , {:controller => "facebook_aware",:action => "index" } %> -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Tue Sep 16 17:52:42 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Tue, 16 Sep 2008 17:52:42 -0400 Subject: [Facebooker-talk] FB Canvas Controller In-Reply-To: <773709.17511.qm@web58703.mail.re1.yahoo.com> References: <773709.17511.qm@web58703.mail.re1.yahoo.com> Message-ID: What is your canvaspath in Facebook? It can't use localhost because Facebook needs to be able to talk to your webserver. You'll need to open up access to your server. I created the Tunnlr service to make this easy (http://tunnlr.com) Check out http://www.pragprog.com/titles/mmfacer for my book on Facebook development. I know there is one By from peepcode as well. Mike On Sep 16, 2008, at 4:53 PM, William Thomas wrote: > I'm having a terrible time figuring this out. I think I am missing > something key to the entire workings of Facebooker. I've created a > sample application to test things out and am failing miserably. > > When I try to access a controller that requires the app installed I > am sent to facebook allowed to authorize the app and then get the > message below. What I believe should happen is the facebook_aware/ > index.fbml.erb file should be displayed. > > " > Error while loading page from facebookSandbox > > The URL http://localhost:3000/facebook_aware/?auth_token=[this is > really the auth token]&installed=1 is not valid. > > There are still a few kinks Facebook and the makers of > facebookSandbox are trying to iron out. We appreciate your patience > as we try to fix these issues. Your problem has been logged - if it > persists, please come back in a few days. Thanks! > " > > here are what I believe are the relavent pieces of my app > > routes.rb: > map.connect 'facebook_aware',:controller => > "facebook_aware", :conditions => {:canvas => true} > > development: > canvas_page_name: facebook_aware > callback_url: http://localhost:3000/facebook_aware/ > > facebook_aware_controller.rb: > class FacebookAwareController < ApplicationController > > before_filter :ensure_application_is_installed_by_facebook_user > before_filter :ensure_authenticated_to_facebook > before_filter :ensure_has_status_update, :only => > [:add_status_update] > > def add_status_update > redirect_to :action => 'done' > end > > end > > (map.root) index.html.erb: > This is where I ask the user to "add" the facebook component > <%= link_to "Use Facebook" , {:controller => > "facebook_aware",:action => "index" } %> > -- Mike Mangino http://www.elevatedrails.com From wthomas989 at yahoo.com Tue Sep 16 18:03:24 2008 From: wthomas989 at yahoo.com (William Thomas) Date: Tue, 16 Sep 2008 15:03:24 -0700 (PDT) Subject: [Facebooker-talk] FB Canvas Controller In-Reply-To: Message-ID: <883780.25845.qm@web58705.mail.re1.yahoo.com> In facebook its callback url : http://localhost:3000/facebook_aware/ canvas_page: http://apps.facebook.com/facebook_aware/ I can try having the callback point to a domain on the internet easy to do, I already have no-ip running @ home... hopefully that will be my only problem. Is it right that I use :conditions => {:canvas => true} for my facebook_aware controller? The goal is to have that controller only exist in a Facebook canvas so I can redirect a user to that controller, and then have facebook take over asking them permissions, etc so my website can do things like query friends and post updates --- On Tue, 9/16/08, Mike Mangino wrote: From: Mike Mangino Subject: Re: [Facebooker-talk] FB Canvas Controller To: wthomas989 at yahoo.com Cc: facebooker-talk at rubyforge.org Date: Tuesday, September 16, 2008, 4:52 PM What is your canvaspath in Facebook? It can't use localhost because Facebook needs to be able to talk to your webserver. You'll need to open up access to your server. I created the Tunnlr service to make this easy (http://tunnlr.com) Check out http://www.pragprog.com/titles/mmfacer for my book on Facebook development. I know there is one By from peepcode as well. Mike On Sep 16, 2008, at 4:53 PM, William Thomas wrote: > I'm having a terrible time figuring this out. I think I am missing > something key to the entire workings of Facebooker. I've created a > sample application to test things out and am failing miserably. > > When I try to access a controller that requires the app installed I > am sent to facebook allowed to authorize the app and then get the > message below. What I believe should happen is the facebook_aware/ > index.fbml.erb file should be displayed. > > " > Error while loading page from facebookSandbox > > The URL http://localhost:3000/facebook_aware/?auth_token=[this is > really the auth token]&installed=1 is not valid. > > There are still a few kinks Facebook and the makers of > facebookSandbox are trying to iron out. We appreciate your patience > as we try to fix these issues. Your problem has been logged - if it > persists, please come back in a few days. Thanks! > " > > here are what I believe are the relavent pieces of my app > > routes.rb: > map.connect 'facebook_aware',:controller => > "facebook_aware", :conditions => {:canvas => true} > > development: > canvas_page_name: facebook_aware > callback_url: http://localhost:3000/facebook_aware/ > > facebook_aware_controller.rb: > class FacebookAwareController < ApplicationController > > before_filter :ensure_application_is_installed_by_facebook_user > before_filter :ensure_authenticated_to_facebook > before_filter :ensure_has_status_update, :only => > [:add_status_update] > > def add_status_update > redirect_to :action => 'done' > end > > end > > (map.root) index.html.erb: > This is where I ask the user to "add" the facebook component > <%= link_to "Use Facebook" , {:controller => > "facebook_aware",:action => "index" } %> > -- Mike Mangino http://www.elevatedrails.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Tue Sep 16 18:14:46 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Tue, 16 Sep 2008 18:14:46 -0400 Subject: [Facebooker-talk] FB Canvas Controller In-Reply-To: <883780.25845.qm@web58705.mail.re1.yahoo.com> References: <883780.25845.qm@web58705.mail.re1.yahoo.com> Message-ID: <03F68553-4A76-485A-9F41-D816B5FB3116@elevatedrails.com> On Sep 16, 2008, at 6:03 PM, William Thomas wrote: > In facebook its > callback url : http://localhost:3000/facebook_aware/ > canvas_page: http://apps.facebook.com/facebook_aware/ > > I can try having the callback point to a domain on the internet easy > to do, I already have no-ip running @ home... hopefully that will be > my only problem. Facebook will need to be able to talk to your local mongrel, so you'll need no-ip and a hole in your firewall > > > Is it right that I use :conditions => {:canvas => true} for my > facebook_aware controller? The goal is to have that controller only > exist in a Facebook canvas so I can redirect a user to that > controller, and then have facebook take over asking them > permissions, etc so my website can do things like query friends and > post updates > You shouldn't even need to do that. Requiring facebook install should be enough. Mike > --- On Tue, 9/16/08, Mike Mangino wrote: > From: Mike Mangino > Subject: Re: [Facebooker-talk] FB Canvas Controller > To: wthomas989 at yahoo.com > Cc: facebooker-talk at rubyforge.org > Date: Tuesday, September 16, 2008, 4:52 PM > > What is your canvaspath in Facebook? It can't use localhost because > Facebook needs to be able to talk to your webserver. You'll need to > open up access to your server. I created the Tunnlr service to make > this easy (http://tunnlr.com) > > Check out http://www.pragprog.com/titles/mmfacer for my book on > Facebook development. I know there is one By from peepcode as well. > > Mike > > On Sep 16, 2008, at 4:53 PM, William Thomas wrote: > > > I'm having a terrible time figuring this out. I think I am missing > > something key to the entire workings of Facebooker. I've created a > > sample application to test things out and am failing miserably. > > > > When I try to access a controller that > requires the app installed I > > am sent to facebook allowed to authorize the app and then get the > > message below. What I believe should happen is the facebook_aware/ > > index.fbml.erb file should be displayed. > > > > " > > Error while loading page from facebookSandbox > > > > The URL http://localhost:3000/facebook_aware/?auth_token=[this is > > really the auth token]&installed=1 is not valid. > > > > There are still a few kinks Facebook and the makers of > > facebookSandbox are trying to iron out. We appreciate your patience > > as we try to fix these issues. Your problem has been logged - if it > > persists, please come back in a few days. Thanks! > > " > > > > here are what I believe are the relavent pieces of my app > > > > routes.rb: > > map.connect 'facebook_aware',:controller => > > "facebook_aware", :conditions => {:canvas => > true} > > > > development: > > canvas_page_name: facebook_aware > > callback_url: http://localhost:3000/facebook_aware/ > > > > facebook_aware_controller.rb: > > class FacebookAwareController < ApplicationController > > > > before_filter :ensure_application_is_installed_by_facebook_user > > before_filter :ensure_authenticated_to_facebook > > before_filter :ensure_has_status_update, :only => > > [:add_status_update] > > > > def add_status_update > > redirect_to :action => 'done' > > end > > > > end > > > > (map.root) index.html.erb: > > This is where I ask the user to "add" the facebook component > > <%= link_to "Use Facebook" , {:controller => > > "facebook_aware",:action => "index" } %> > > > > -- > Mike Mangino > http://www.elevatedrails.com > > > > -- Mike Mangino http://www.elevatedrails.com From paul.covell at gmail.com Wed Sep 17 01:43:41 2008 From: paul.covell at gmail.com (Paul Covell) Date: Wed, 17 Sep 2008 13:43:41 +0800 Subject: [Facebooker-talk] Change since Sept 4 breaks stylesheet, javascript links Message-ID: <3E8ACCAE-A341-43DA-9796-C65B622F3703@gmail.com> Hi guys -- the commit d6874ec47a51065f0d98e1a966ae5540486fe1b6 breaks the callback_url assigning in Facebooker+Rails. I noticed it because my stylesheets + javascript stopped linking in. Here is my diff against the head that does what I think you were trying to do (Module.const_defined? --> Object.const_defined?). It restores the functionality back to the pre-d6.. commit. diff --git a/lib/facebooker.rb b/lib/facebooker.rb index c79cb92..b28f2d7 100644 --- a/lib/facebooker.rb +++ b/lib/facebooker.rb @@ -65,7 +65,7 @@ module Facebooker ENV['FACEBOOK_SECRET_KEY'] = facebooker['secret_key'] ENV['FACEBOOKER_RELATIVE_URL_ROOT'] = facebooker['canvas_page_name'] ENV['FACEBOOKER_API'] = facebooker['api'] - if Module.const_defined?("ActionController") + if Object.const_defined?("ActionController") ActionController::Base.asset_host = facebooker['callback_url'] if(ActionController::Base. end @facebooker_configuration = facebooker ---> Additional data: On commit 37a732248d3b1d107add30847616efd02826b1e4 (HEAD): On commit ee9e0b728e1cc0d02c856d90f82297806040b128: -Paul From auswalk at gmail.com Wed Sep 17 02:43:12 2008 From: auswalk at gmail.com (Allen Walker) Date: Wed, 17 Sep 2008 01:43:12 -0500 Subject: [Facebooker-talk] creating facebook events in app? Message-ID: <48D0A700.4070505@gmail.com> Is there a way to create facebook events using facebooker? I know from the facebook api: http://wiki.developers.facebook.com/index.php/Events.create What I want to do is let users create facebook events inside my app. Obviously I know how to get a user's events. I guess my question maybe what is the most logical way for a user to create facebook events and stay inside my application. I want to leverage as much as possible from the facebook events app. thanks From wthomas989 at yahoo.com Wed Sep 17 12:30:56 2008 From: wthomas989 at yahoo.com (William Thomas) Date: Wed, 17 Sep 2008 09:30:56 -0700 (PDT) Subject: [Facebooker-talk] Restful Authentication Message-ID: <53604.51925.qm@web58707.mail.re1.yahoo.com> Has anybody integrated facebooker with a restful authentication app? I've read the pragmatic programmer's book ch 8 about making changes to session store, but I would really like to keep my default cookie session store. The goal here is to have a user on my site add facebook to their account, so I need to store the FB uid in my db. Unfortunately the session containing the user's login is not used when fb comes back, rightfully so. Is there a way to pass a key across to the facebook canvas so when it calls back to my site, I can figure out what user/session it came from? -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Wed Sep 17 13:14:08 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 17 Sep 2008 13:14:08 -0400 Subject: [Facebooker-talk] Restful Authentication In-Reply-To: <53604.51925.qm@web58707.mail.re1.yahoo.com> References: <53604.51925.qm@web58707.mail.re1.yahoo.com> Message-ID: On Sep 17, 2008, at 12:30 PM, William Thomas wrote: > Has anybody integrated facebooker with a restful authentication app? > I've read the pragmatic programmer's book ch 8 about making changes > to session store, but I would really like to keep my default cookie > session store. The goal here is to have a user on my site add > facebook to their account, so I need to store the FB uid in my db. > Unfortunately the session containing the user's login is not used > when fb comes back, rightfully so. > Sure, doing this can be relatively easy. There are a couple of options. First, you can have the user login to your application from inside the Facebook canvas. That way, you'll have a facebook session and can join that with their user in the DB. You could also include the remember token in a URL where you send the user to Facebook. Then, you could look up the restful authentication user by this remember token and join them to the facebook user. Mike > Is there a way to pass a key across to the facebook canvas so when > it calls back to my site, I can figure out what user/session it came > from? > > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From schroeder.ken at gmail.com Wed Sep 17 15:05:01 2008 From: schroeder.ken at gmail.com (Ken Schroeder) Date: Wed, 17 Sep 2008 15:05:01 -0400 Subject: [Facebooker-talk] Rails 2.1.1 and Facebooker upgrade Message-ID: I've upgraded to Rails 2.1.1 from 2.0.2 last night and changed from facebooker plugin to facebooker gem 0.9.5 it currently seems as though canvas isn't being detected and it's trying to render .html format files instead of fbml format. I see fb_sig_in_canvas=>"1" in my params requested but fails to render. Anyone else running 2.1.1 yet and have similar issues or do I need to change something when using the gem version? Thanks --ken -------------- next part -------------- An HTML attachment was scrubbed... URL: From wthomas989 at yahoo.com Wed Sep 17 15:54:23 2008 From: wthomas989 at yahoo.com (William Thomas) Date: Wed, 17 Sep 2008 12:54:23 -0700 (PDT) Subject: [Facebooker-talk] Restful Authentication In-Reply-To: Message-ID: <892003.19524.qm@web58706.mail.re1.yahoo.com> I'm trying method number 2: passing the remember token in the URL. It looks like install.php and login.php urls eat any params I send to them. Does this mean that I have to have a page served on my app that does not require installation or authentication to facebook? --- On Wed, 9/17/08, Mike Mangino wrote: From: Mike Mangino Subject: Re: [Facebooker-talk] Restful Authentication To: wthomas989 at yahoo.com Cc: facebooker-talk at rubyforge.org Date: Wednesday, September 17, 2008, 12:14 PM On Sep 17, 2008, at 12:30 PM, William Thomas wrote: > Has anybody integrated facebooker with a restful authentication app? > I've read the pragmatic programmer's book ch 8 about making changes > to session store, but I would really like to keep my default cookie > session store. The goal here is to have a user on my site add > facebook to their account, so I need to store the FB uid in my db. > Unfortunately the session containing the user's login is not used > when fb comes back, rightfully so. > Sure, doing this can be relatively easy. There are a couple of options. First, you can have the user login to your application from inside the Facebook canvas. That way, you'll have a facebook session and can join that with their user in the DB. You could also include the remember token in a URL where you send the user to Facebook. Then, you could look up the restful authentication user by this remember token and join them to the facebook user. Mike > Is there a way to pass a key across to the facebook canvas so when > it calls back to my site, I can figure out what user/session it came > from? > > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Wed Sep 17 16:23:08 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 17 Sep 2008 16:23:08 -0400 Subject: [Facebooker-talk] Rails 2.1.1 and Facebooker upgrade In-Reply-To: References: Message-ID: <1BEA218C-6AD7-4487-B98A-C1F918D13039@elevatedrails.com> The gem version isn't current. If you want to use the gem version, I would recommend that you build the gem from the most recent git version. Mike On Sep 17, 2008, at 3:05 PM, Ken Schroeder wrote: > I've upgraded to Rails 2.1.1 from 2.0.2 last night and changed from > facebooker plugin to facebooker gem 0.9.5 it currently seems as > though canvas isn't being detected and it's trying to render .html > format files instead of fbml format. I see fb_sig_in_canvas=>"1" in > my params requested but fails to render. Anyone else running 2.1.1 > yet and have similar issues or do I need to change something when > using the gem version? Thanks --ken > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From mmangino at elevatedrails.com Wed Sep 17 16:23:56 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 17 Sep 2008 16:23:56 -0400 Subject: [Facebooker-talk] Restful Authentication In-Reply-To: <892003.19524.qm@web58706.mail.re1.yahoo.com> References: <892003.19524.qm@web58706.mail.re1.yahoo.com> Message-ID: <29244F5C-2F36-4362-B05A-BBE5CA341865@elevatedrails.com> You can pass parameters. Take a look at the facebooker_authentication on github for seeing how to pass parameters using the next parameter. Mike On Sep 17, 2008, at 3:54 PM, William Thomas wrote: > I'm trying method number 2: passing the remember token in the URL. > > It looks like install.php and login.php urls eat any params I send > to them. Does this mean that I have to have a page served on my app > that does not require installation or authentication to facebook? > > > --- On Wed, 9/17/08, Mike Mangino wrote: > From: Mike Mangino > Subject: Re: [Facebooker-talk] Restful Authentication > To: wthomas989 at yahoo.com > Cc: facebooker-talk at rubyforge.org > Date: Wednesday, September 17, 2008, 12:14 PM > > On Sep 17, 2008, at 12:30 PM, William Thomas wrote: > > > Has anybody integrated facebooker with a restful authentication app? > > I've read the > pragmatic programmer's book ch 8 about making > changes > > to session store, but I would really like to keep my default cookie > > session store. The goal here is to have a user on my site add > > facebook to their account, so I need to store the FB uid in my db. > > Unfortunately the session containing the user's login is not used > > when fb comes back, rightfully so. > > > > Sure, doing this can be relatively easy. There are a couple of > options. First, you can have the user login to your application from > inside the Facebook canvas. That way, you'll have a facebook session > and can join that with their user in the DB. You could also include > the remember token in a URL where you send the user to Facebook. Then, > you could look up the restful authentication user by this remember > token and join them to the facebook user. > > Mike > > > Is there a way to pass a key across to the > facebook canvas so when > > it calls back to my site, I can figure out what user/session it came > > from? > > > > > > > > _______________________________________________ > > Facebooker-talk mailing list > > Facebooker-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com > > > > -- Mike Mangino http://www.elevatedrails.com From schroeder.ken at gmail.com Wed Sep 17 17:33:41 2008 From: schroeder.ken at gmail.com (Ken Schroeder) Date: Wed, 17 Sep 2008 17:33:41 -0400 Subject: [Facebooker-talk] Rails 2.1.1 and Facebooker upgrade In-Reply-To: <1BEA218C-6AD7-4487-B98A-C1F918D13039@elevatedrails.com> References: <1BEA218C-6AD7-4487-B98A-C1F918D13039@elevatedrails.com> Message-ID: Yeah I removed the gem and installed the plugin from git. Authentication is functioning again. I'm having a bunch of other small issues like stylesheets not loading and errors about image relative paths not allowed. I know unrelated to facebooker but been googling for couple hours now havent' found a solution yet. If anyone has any clues greatly appreciated. Thanks On Wed, Sep 17, 2008 at 4:23 PM, Mike Mangino wrote: > The gem version isn't current. If you want to use the gem version, I would > recommend that you build the gem from the most recent git version. > > Mike > > On Sep 17, 2008, at 3:05 PM, Ken Schroeder wrote: > > I've upgraded to Rails 2.1.1 from 2.0.2 last night and changed from >> facebooker plugin to facebooker gem 0.9.5 it currently seems as though >> canvas isn't being detected and it's trying to render .html format files >> instead of fbml format. I see fb_sig_in_canvas=>"1" in my params requested >> but fails to render. Anyone else running 2.1.1 yet and have similar issues >> or do I need to change something when using the gem version? Thanks --ken >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > > -- > Mike Mangino > http://www.elevatedrails.com > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tres.wong-godfrey at saniq.com Wed Sep 17 17:41:36 2008 From: tres.wong-godfrey at saniq.com (Tres Wong-Godfrey) Date: Wed, 17 Sep 2008 14:41:36 -0700 Subject: [Facebooker-talk] Rails 2.1.1 and Facebooker upgrade In-Reply-To: References: <1BEA218C-6AD7-4487-B98A-C1F918D13039@elevatedrails.com> Message-ID: <11C50FED-7DA3-46EC-98EF-43236A24A8A0@saniq.com> Try setting up an asset host in your environment.rb config file to handle the relative URL errors. ActionController::Base.asset_host = "http://application.callback-host.com:3001 " On Sep 17, 2008, at 2:33 PM, Ken Schroeder wrote: > Yeah I removed the gem and installed the plugin from git. > Authentication is functioning again. I'm having a bunch of other > small issues like stylesheets not loading and errors about image > relative paths not allowed. I know unrelated to facebooker but been > googling for couple hours now havent' found a solution yet. If > anyone has any clues greatly appreciated. Thanks > > On Wed, Sep 17, 2008 at 4:23 PM, Mike Mangino > wrote: > The gem version isn't current. If you want to use the gem version, I > would recommend that you build the gem from the most recent git > version. > > Mike > > > On Sep 17, 2008, at 3:05 PM, Ken Schroeder wrote: > > I've upgraded to Rails 2.1.1 from 2.0.2 last night and changed from > facebooker plugin to facebooker gem 0.9.5 it currently seems as > though canvas isn't being detected and it's trying to render .html > format files instead of fbml format. I see fb_sig_in_canvas=>"1" in > my params requested but fails to render. Anyone else running 2.1.1 > yet and have similar issues or do I need to change something when > using the gem version? Thanks --ken > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com > > > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From dara at catch.fm Wed Sep 17 18:13:02 2008 From: dara at catch.fm (dara) Date: Wed, 17 Sep 2008 23:13:02 +0100 Subject: [Facebooker-talk] Asynchronous Updates to Bebo Message-ID: <48D180EE.2090909@catch.fm> Hi, I'm looking at updating the profile outside of the call from bebo. I have started using Starling/memcache, as per Mikes good book. However, when I get user.facebook_session, it is associated with facebook and the next call (to set a ref handle fbml) fails of course. Could anyone give any pointers as to what else might be required, I've tried a few things to get the session set up correctly in the rake task through adapter usage, trying to base it on what happens in the intial stages of a request from bebo, but so far I'm shooting in the dark here really. Thanks if you can provide any tips Dara From george at xapblog.com Wed Sep 17 18:15:54 2008 From: george at xapblog.com (George Deglin) Date: Wed, 17 Sep 2008 15:15:54 -0700 Subject: [Facebooker-talk] Rails 2.1.1 and Facebooker upgrade In-Reply-To: <11C50FED-7DA3-46EC-98EF-43236A24A8A0@saniq.com> References: <1BEA218C-6AD7-4487-B98A-C1F918D13039@elevatedrails.com> <11C50FED-7DA3-46EC-98EF-43236A24A8A0@saniq.com> Message-ID: Just downloaded a new version of the gem and had the same problem. Using manually setting ActionController::Base.asset_host made things work again. Looks like there's a problem with load_configration since Module.const_defined?("ActionController") returns false for me and asset_host never gets set. On Wed, Sep 17, 2008 at 2:41 PM, Tres Wong-Godfrey < tres.wong-godfrey at saniq.com> wrote: > > Try setting up an asset host in your environment.rb config file to handle > the relative URL errors. > > ActionController::Base.asset_host = " > http://application.callback-host.com:3001" > > > > On Sep 17, 2008, at 2:33 PM, Ken Schroeder wrote: > > Yeah I removed the gem and installed the plugin from git. Authentication >> is functioning again. I'm having a bunch of other small issues like >> stylesheets not loading and errors about image relative paths not allowed. >> I know unrelated to facebooker but been googling for couple hours now >> havent' found a solution yet. If anyone has any clues greatly appreciated. >> Thanks >> >> On Wed, Sep 17, 2008 at 4:23 PM, Mike Mangino >> wrote: >> The gem version isn't current. If you want to use the gem version, I would >> recommend that you build the gem from the most recent git version. >> >> Mike >> >> >> On Sep 17, 2008, at 3:05 PM, Ken Schroeder wrote: >> >> I've upgraded to Rails 2.1.1 from 2.0.2 last night and changed from >> facebooker plugin to facebooker gem 0.9.5 it currently seems as though >> canvas isn't being detected and it's trying to render .html format files >> instead of fbml format. I see fb_sig_in_canvas=>"1" in my params requested >> but fails to render. Anyone else running 2.1.1 yet and have similar issues >> or do I need to change something when using the gem version? Thanks --ken >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> -- >> Mike Mangino >> http://www.elevatedrails.com >> >> >> >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From schroeder.ken at gmail.com Wed Sep 17 18:19:49 2008 From: schroeder.ken at gmail.com (Ken Schroeder) Date: Wed, 17 Sep 2008 18:19:49 -0400 Subject: [Facebooker-talk] Rails 2.1.1 and Facebooker upgrade In-Reply-To: References: <1BEA218C-6AD7-4487-B98A-C1F918D13039@elevatedrails.com> <11C50FED-7DA3-46EC-98EF-43236A24A8A0@saniq.com> Message-ID: The problem seems isolated to facebook as my external interface is loading css and images just fine with no complaints. I'll try adding asset_host here to see if that helps for facebook. On Wed, Sep 17, 2008 at 6:15 PM, George Deglin wrote: > Just downloaded a new version of the gem and had the same problem. Using > manually setting ActionController::Base.asset_host made things work again. > > Looks like there's a problem with load_configration since > Module.const_defined?("ActionController") returns false for me and > asset_host never gets set. > > On Wed, Sep 17, 2008 at 2:41 PM, Tres Wong-Godfrey < > tres.wong-godfrey at saniq.com> wrote: > >> >> Try setting up an asset host in your environment.rb config file to handle >> the relative URL errors. >> >> ActionController::Base.asset_host = " >> http://application.callback-host.com:3001" >> >> >> >> On Sep 17, 2008, at 2:33 PM, Ken Schroeder wrote: >> >> Yeah I removed the gem and installed the plugin from git. Authentication >>> is functioning again. I'm having a bunch of other small issues like >>> stylesheets not loading and errors about image relative paths not allowed. >>> I know unrelated to facebooker but been googling for couple hours now >>> havent' found a solution yet. If anyone has any clues greatly appreciated. >>> Thanks >>> >>> On Wed, Sep 17, 2008 at 4:23 PM, Mike Mangino < >>> mmangino at elevatedrails.com> wrote: >>> The gem version isn't current. If you want to use the gem version, I >>> would recommend that you build the gem from the most recent git version. >>> >>> Mike >>> >>> >>> On Sep 17, 2008, at 3:05 PM, Ken Schroeder wrote: >>> >>> I've upgraded to Rails 2.1.1 from 2.0.2 last night and changed from >>> facebooker plugin to facebooker gem 0.9.5 it currently seems as though >>> canvas isn't being detected and it's trying to render .html format files >>> instead of fbml format. I see fb_sig_in_canvas=>"1" in my params requested >>> but fails to render. Anyone else running 2.1.1 yet and have similar issues >>> or do I need to change something when using the gem version? Thanks --ken >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >>> -- >>> Mike Mangino >>> http://www.elevatedrails.com >>> >>> >>> >>> >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tres.wong-godfrey at saniq.com Wed Sep 17 18:21:50 2008 From: tres.wong-godfrey at saniq.com (Tres Wong-Godfrey) Date: Wed, 17 Sep 2008 15:21:50 -0700 Subject: [Facebooker-talk] Rails 2.1.1 and Facebooker upgrade In-Reply-To: References: <1BEA218C-6AD7-4487-B98A-C1F918D13039@elevatedrails.com> <11C50FED-7DA3-46EC-98EF-43236A24A8A0@saniq.com> Message-ID: <1BC544FA-DF1F-49FA-AB3B-F3EAAE708F8D@saniq.com> Are you setting the asset_host from within the Rails::Initializer.run block? If so, try putting it after the end of the block and see what happens. On Sep 17, 2008, at 3:15 PM, George Deglin wrote: > Just downloaded a new version of the gem and had the same problem. > Using manually setting ActionController::Base.asset_host made things > work again. > > Looks like there's a problem with load_configration since > Module.const_defined?("ActionController") returns false for me and > asset_host never gets set. > > On Wed, Sep 17, 2008 at 2:41 PM, Tres Wong-Godfrey > wrote: > > Try setting up an asset host in your environment.rb config file to > handle the relative URL errors. > > ActionController::Base.asset_host = "http://application.callback-host.com:3001 > " > > > > On Sep 17, 2008, at 2:33 PM, Ken Schroeder wrote: > > Yeah I removed the gem and installed the plugin from git. > Authentication is functioning again. I'm having a bunch of other > small issues like stylesheets not loading and errors about image > relative paths not allowed. I know unrelated to facebooker but been > googling for couple hours now havent' found a solution yet. If > anyone has any clues greatly appreciated. Thanks > > On Wed, Sep 17, 2008 at 4:23 PM, Mike Mangino > wrote: > The gem version isn't current. If you want to use the gem version, I > would recommend that you build the gem from the most recent git > version. > > Mike > > > On Sep 17, 2008, at 3:05 PM, Ken Schroeder wrote: > > I've upgraded to Rails 2.1.1 from 2.0.2 last night and changed from > facebooker plugin to facebooker gem 0.9.5 it currently seems as > though canvas isn't being detected and it's trying to render .html > format files instead of fbml format. I see fb_sig_in_canvas=>"1" in > my params requested but fails to render. Anyone else running 2.1.1 > yet and have similar issues or do I need to change something when > using the gem version? Thanks --ken > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com > > > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > From mmangino at elevatedrails.com Wed Sep 17 18:28:49 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Wed, 17 Sep 2008 18:28:49 -0400 Subject: [Facebooker-talk] Rails 2.1.1 and Facebooker upgrade In-Reply-To: References: <1BEA218C-6AD7-4487-B98A-C1F918D13039@elevatedrails.com> <11C50FED-7DA3-46EC-98EF-43236A24A8A0@saniq.com> Message-ID: <5184DB28-769E-44B2-A25A-8AF67E3A8946@elevatedrails.com> I just pushed a fix for this. Can you update and try again? Mike On Sep 17, 2008, at 6:15 PM, George Deglin wrote: > Just downloaded a new version of the gem and had the same problem. > Using manually setting ActionController::Base.asset_host made things > work again. > > Looks like there's a problem with load_configration since > Module.const_defined?("ActionController") returns false for me and > asset_host never gets set. > > On Wed, Sep 17, 2008 at 2:41 PM, Tres Wong-Godfrey > wrote: > > Try setting up an asset host in your environment.rb config file to > handle the relative URL errors. > > ActionController::Base.asset_host = "http://application.callback-host.com:3001 > " > > > > On Sep 17, 2008, at 2:33 PM, Ken Schroeder wrote: > > Yeah I removed the gem and installed the plugin from git. > Authentication is functioning again. I'm having a bunch of other > small issues like stylesheets not loading and errors about image > relative paths not allowed. I know unrelated to facebooker but been > googling for couple hours now havent' found a solution yet. If > anyone has any clues greatly appreciated. Thanks > > On Wed, Sep 17, 2008 at 4:23 PM, Mike Mangino > wrote: > The gem version isn't current. If you want to use the gem version, I > would recommend that you build the gem from the most recent git > version. > > Mike > > > On Sep 17, 2008, at 3:05 PM, Ken Schroeder wrote: > > I've upgraded to Rails 2.1.1 from 2.0.2 last night and changed from > facebooker plugin to facebooker gem 0.9.5 it currently seems as > though canvas isn't being detected and it's trying to render .html > format files instead of fbml format. I see fb_sig_in_canvas=>"1" in > my params requested but fails to render. Anyone else running 2.1.1 > yet and have similar issues or do I need to change something when > using the gem version? Thanks --ken > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- > Mike Mangino > http://www.elevatedrails.com > > > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From george at xapblog.com Wed Sep 17 18:31:31 2008 From: george at xapblog.com (George Deglin) Date: Wed, 17 Sep 2008 15:31:31 -0700 Subject: [Facebooker-talk] Rails 2.1.1 and Facebooker upgrade In-Reply-To: <5184DB28-769E-44B2-A25A-8AF67E3A8946@elevatedrails.com> References: <1BEA218C-6AD7-4487-B98A-C1F918D13039@elevatedrails.com> <11C50FED-7DA3-46EC-98EF-43236A24A8A0@saniq.com> <5184DB28-769E-44B2-A25A-8AF67E3A8946@elevatedrails.com> Message-ID: Yep the fix worked. Thanks On Wed, Sep 17, 2008 at 3:28 PM, Mike Mangino wrote: > I just pushed a fix for this. Can you update and try again? > > Mike > > On Sep 17, 2008, at 6:15 PM, George Deglin wrote: > > Just downloaded a new version of the gem and had the same problem. Using >> manually setting ActionController::Base.asset_host made things work again. >> >> Looks like there's a problem with load_configration since >> Module.const_defined?("ActionController") returns false for me and >> asset_host never gets set. >> >> On Wed, Sep 17, 2008 at 2:41 PM, Tres Wong-Godfrey < >> tres.wong-godfrey at saniq.com> wrote: >> >> Try setting up an asset host in your environment.rb config file to handle >> the relative URL errors. >> >> ActionController::Base.asset_host = " >> http://application.callback-host.com:3001" >> >> >> >> On Sep 17, 2008, at 2:33 PM, Ken Schroeder wrote: >> >> Yeah I removed the gem and installed the plugin from git. Authentication >> is functioning again. I'm having a bunch of other small issues like >> stylesheets not loading and errors about image relative paths not allowed. >> I know unrelated to facebooker but been googling for couple hours now >> havent' found a solution yet. If anyone has any clues greatly appreciated. >> Thanks >> >> On Wed, Sep 17, 2008 at 4:23 PM, Mike Mangino >> wrote: >> The gem version isn't current. If you want to use the gem version, I would >> recommend that you build the gem from the most recent git version. >> >> Mike >> >> >> On Sep 17, 2008, at 3:05 PM, Ken Schroeder wrote: >> >> I've upgraded to Rails 2.1.1 from 2.0.2 last night and changed from >> facebooker plugin to facebooker gem 0.9.5 it currently seems as though >> canvas isn't being detected and it's trying to render .html format files >> instead of fbml format. I see fb_sig_in_canvas=>"1" in my params requested >> but fails to render. Anyone else running 2.1.1 yet and have similar issues >> or do I need to change something when using the gem version? Thanks --ken >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> -- >> Mike Mangino >> http://www.elevatedrails.com >> >> >> >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > > -- > Mike Mangino > http://www.elevatedrails.com > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From schroeder.ken at gmail.com Wed Sep 17 18:35:40 2008 From: schroeder.ken at gmail.com (Ken Schroeder) Date: Wed, 17 Sep 2008 18:35:40 -0400 Subject: [Facebooker-talk] Rails 2.1.1 and Facebooker upgrade In-Reply-To: References: <1BEA218C-6AD7-4487-B98A-C1F918D13039@elevatedrails.com> <11C50FED-7DA3-46EC-98EF-43236A24A8A0@saniq.com> <5184DB28-769E-44B2-A25A-8AF67E3A8946@elevatedrails.com> Message-ID: Yes thanks a bunch works great now. --ken On Wed, Sep 17, 2008 at 6:31 PM, George Deglin wrote: > Yep the fix worked. Thanks > > > On Wed, Sep 17, 2008 at 3:28 PM, Mike Mangino wrote: > >> I just pushed a fix for this. Can you update and try again? >> >> Mike >> >> On Sep 17, 2008, at 6:15 PM, George Deglin wrote: >> >> Just downloaded a new version of the gem and had the same problem. Using >>> manually setting ActionController::Base.asset_host made things work again. >>> >>> Looks like there's a problem with load_configration since >>> Module.const_defined?("ActionController") returns false for me and >>> asset_host never gets set. >>> >>> On Wed, Sep 17, 2008 at 2:41 PM, Tres Wong-Godfrey < >>> tres.wong-godfrey at saniq.com> wrote: >>> >>> Try setting up an asset host in your environment.rb config file to handle >>> the relative URL errors. >>> >>> ActionController::Base.asset_host = " >>> http://application.callback-host.com:3001" >>> >>> >>> >>> On Sep 17, 2008, at 2:33 PM, Ken Schroeder wrote: >>> >>> Yeah I removed the gem and installed the plugin from git. Authentication >>> is functioning again. I'm having a bunch of other small issues like >>> stylesheets not loading and errors about image relative paths not allowed. >>> I know unrelated to facebooker but been googling for couple hours now >>> havent' found a solution yet. If anyone has any clues greatly appreciated. >>> Thanks >>> >>> On Wed, Sep 17, 2008 at 4:23 PM, Mike Mangino < >>> mmangino at elevatedrails.com> wrote: >>> The gem version isn't current. If you want to use the gem version, I >>> would recommend that you build the gem from the most recent git version. >>> >>> Mike >>> >>> >>> On Sep 17, 2008, at 3:05 PM, Ken Schroeder wrote: >>> >>> I've upgraded to Rails 2.1.1 from 2.0.2 last night and changed from >>> facebooker plugin to facebooker gem 0.9.5 it currently seems as though >>> canvas isn't being detected and it's trying to render .html format files >>> instead of fbml format. I see fb_sig_in_canvas=>"1" in my params requested >>> but fails to render. Anyone else running 2.1.1 yet and have similar issues >>> or do I need to change something when using the gem version? Thanks --ken >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >>> -- >>> Mike Mangino >>> http://www.elevatedrails.com >>> >>> >>> >>> >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >> >> -- >> Mike Mangino >> http://www.elevatedrails.com >> >> >> >> > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe at pinkpucker.net Wed Sep 17 19:01:50 2008 From: joe at pinkpucker.net (Joe Van Dyk) Date: Wed, 17 Sep 2008 16:01:50 -0700 Subject: [Facebooker-talk] Merb? Message-ID: Anyone use merb for facebook apps? Seems like Merb would be a better choice for facebook apps, being thread-safe and all. Joe From bjclark at scidept.com Wed Sep 17 19:16:47 2008 From: bjclark at scidept.com (BJ Clark) Date: Wed, 17 Sep 2008 17:16:47 -0600 Subject: [Facebooker-talk] Merb? In-Reply-To: References: Message-ID: <78C9B5AE-3518-44E8-B8F1-E1CA40D6163C@scidept.com> Joe, I only know of this: http://github.com/vanpelt/merb_facebooker/tree/master No idea of how well it works. BJ On Sep 17, 2008, at 5:01 PM, Joe Van Dyk wrote: > Anyone use merb for facebook apps? Seems like Merb would be a better > choice for facebook apps, being thread-safe and all. > > Joe > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From george at xapblog.com Wed Sep 17 19:28:02 2008 From: george at xapblog.com (George Deglin) Date: Wed, 17 Sep 2008 16:28:02 -0700 Subject: [Facebooker-talk] Facebooker with expanded FJBS library Message-ID: A few weeks ago I posted an FBJS library that I had been working on. I have now updated that library to be fully compatible with Facebooker and created a publicity accessible fork for people to try it out. I did attempt to maintain backwards compatability, but I strongly recommend switching to the new methods. The fork is located here: http://github.com/gdeglin/facebooker/ A helper has been included to load the library, use it as follows: <%= fbjs_library %>. This is required for Ajax methods to work. Next I'm planning to implement some helpers methods like link_to_remote, form_remote_tag, etc. This is my first time contributing to a project using git and my first time contributing to a plugin so please let me know if anything seems out of place. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ivey at gweezlebur.com Wed Sep 17 20:38:29 2008 From: ivey at gweezlebur.com (Michael D. Ivey) Date: Wed, 17 Sep 2008 19:38:29 -0500 Subject: [Facebooker-talk] Merb? In-Reply-To: <78C9B5AE-3518-44E8-B8F1-E1CA40D6163C@scidept.com> References: <78C9B5AE-3518-44E8-B8F1-E1CA40D6163C@scidept.com> Message-ID: On Sep 17, 2008, at 6:16 PM, BJ Clark wrote: > I only know of this: > http://github.com/vanpelt/merb_facebooker/tree/master > > No idea of how well it works. Take a look at shayarnett's fork as well, and let me know if you have any trouble. I have a Merb app running w/ Facebooker, but we're not doing any of the new profile stuff, obviously. Ultimately, I'd like to see merb_facebooker go away if we can get decent Merb support built into Facebooker itself. From joe at pinkpucker.net Wed Sep 17 22:10:05 2008 From: joe at pinkpucker.net (Joe Van Dyk) Date: Wed, 17 Sep 2008 19:10:05 -0700 Subject: [Facebooker-talk] Merb? In-Reply-To: References: <78C9B5AE-3518-44E8-B8F1-E1CA40D6163C@scidept.com> Message-ID: On Wed, Sep 17, 2008 at 5:38 PM, Michael D. Ivey wrote: > > On Sep 17, 2008, at 6:16 PM, BJ Clark wrote: >> >> I only know of this: >> http://github.com/vanpelt/merb_facebooker/tree/master >> >> No idea of how well it works. > > Take a look at shayarnett's fork as well, and let me know if you have any > trouble. I have a Merb app running w/ Facebooker, but we're not doing any > of the new profile stuff, obviously. > > Ultimately, I'd like to see merb_facebooker go away if we can get decent > Merb support built into Facebooker itself. You mean the same plugin could support both Rails and Merb? And Merb would be a better fit for Facebook, right? From auswalk at gmail.com Thu Sep 18 02:09:02 2008 From: auswalk at gmail.com (Allen Walker) Date: Thu, 18 Sep 2008 01:09:02 -0500 Subject: [Facebooker-talk] problem doing a CRUD update? Message-ID: <48D1F07E.5090701@gmail.com> This appears to be some kind of routing issue since facebook wraps everything in a post... so here's what I'm doing: <% form_for :article, :url => { :action => "update", :id => @article } do |f| %> <%= render :partial => "form", :locals => { :f => f } %> <% end -%> renders:
....
The form comes up populated with the model data, but I submit though I get: Unknown action No action responded to 7 In the rake routes the "update" requires a HTTP "put" so I'm wondering if that is causing the problem. thanks From tres.wong-godfrey at saniq.com Thu Sep 18 02:32:25 2008 From: tres.wong-godfrey at saniq.com (Tres Wong-Godfrey) Date: Wed, 17 Sep 2008 23:32:25 -0700 Subject: [Facebooker-talk] problem doing a CRUD update? In-Reply-To: <48D1F07E.5090701@gmail.com> References: <48D1F07E.5090701@gmail.com> Message-ID: <0AEE2470-008B-445E-A5B5-763B04E1482A@saniq.com> Try something like this: form_for :article, :url => { :action => "update", :id => @article }, :html => { :method => :put } do |f| That should give you the 'PUT' method. On Sep 17, 2008, at 11:09 PM, Allen Walker wrote: > This appears to be some kind of routing issue since facebook wraps > everything in a post... so here's what I'm doing: > > <% form_for :article, :url => { :action => "update", :id => > @article } do |f| > %> <%= > render :partial => "form", :locals => { :f => f } %> > <% end -%> > renders: > >
> > .... >
> The form comes up populated with the model data, but I submit though > I get: > > > Unknown action > > No action responded to 7 > > > > In the rake routes the "update" requires a HTTP "put" so I'm > wondering if that is causing the problem. > > thanks > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From auswalk at gmail.com Thu Sep 18 02:58:29 2008 From: auswalk at gmail.com (Allen Walker) Date: Thu, 18 Sep 2008 01:58:29 -0500 Subject: [Facebooker-talk] problem doing a CRUD update? In-Reply-To: <0AEE2470-008B-445E-A5B5-763B04E1482A@saniq.com> References: <48D1F07E.5090701@gmail.com> <0AEE2470-008B-445E-A5B5-763B04E1482A@saniq.com> Message-ID: <48D1FC15.9030801@gmail.com> Thanks, that worked. Tres Wong-Godfrey wrote: > > Try something like this: > form_for :article, :url => { :action => "update", :id => @article }, > :html => { :method => :put } do |f| > > That should give you the 'PUT' method. > > > On Sep 17, 2008, at 11:09 PM, Allen Walker wrote: > >> This appears to be some kind of routing issue since facebook wraps >> everything in a post... so here's what I'm doing: >> >> <% form_for :article, :url => { :action => "update", :id => @article >> } do |f| %> <%= >> render :partial => "form", :locals => { :f => f } %> >> <% end -%> >> renders: >> >>
>> >> .... >>
>> The form comes up populated with the model data, but I submit though >> I get: >> >> >> Unknown action >> >> No action responded to 7 >> >> >> >> In the rake routes the "update" requires a HTTP "put" so I'm >> wondering if that is causing the problem. >> >> thanks >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > From auswalk at gmail.com Thu Sep 18 03:09:02 2008 From: auswalk at gmail.com (Allen Walker) Date: Thu, 18 Sep 2008 02:09:02 -0500 Subject: [Facebooker-talk] problem doing a CRUD update? In-Reply-To: <0AEE2470-008B-445E-A5B5-763B04E1482A@saniq.com> References: <48D1F07E.5090701@gmail.com> <0AEE2470-008B-445E-A5B5-763B04E1482A@saniq.com> Message-ID: <48D1FE8E.1020809@gmail.com> I'm now trying to do a "destroy". I do this: <%=link_to("Delete", url_for(:controller => "articles", :action => "destroy", :id => article, :_method => :delete), :confirm => 'Are you sure?' )%> When i execute it, i get: ActionController::InvalidAuthenticityToken in ArticlesController#destroy ActionController::InvalidAuthenticityToken If I comment out "protect_from_forgery :secret => 'xx'" in application.rb I get when i just try to view the page: ActionView::TemplateError (No :secret given to the #protect_from_forgery call. Set that or use a session store capable of generating its own keys (Cookie Session Store).) Tres Wong-Godfrey wrote: > > Try something like this: > form_for :article, :url => { :action => "update", :id => @article }, > :html => { :method => :put } do |f| > > That should give you the 'PUT' method. > > > On Sep 17, 2008, at 11:09 PM, Allen Walker wrote: > >> This appears to be some kind of routing issue since facebook wraps >> everything in a post... so here's what I'm doing: >> >> <% form_for :article, :url => { :action => "update", :id => @article >> } do |f| %> <%= >> render :partial => "form", :locals => { :f => f } %> >> <% end -%> >> renders: >> >>
>> >> .... >>
>> The form comes up populated with the model data, but I submit though >> I get: >> >> >> Unknown action >> >> No action responded to 7 >> >> >> >> In the rake routes the "update" requires a HTTP "put" so I'm >> wondering if that is causing the problem. >> >> thanks >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > From tres.wong-godfrey at saniq.com Thu Sep 18 03:49:45 2008 From: tres.wong-godfrey at saniq.com (Tres Wong-Godfrey) Date: Thu, 18 Sep 2008 00:49:45 -0700 Subject: [Facebooker-talk] problem doing a CRUD update? In-Reply-To: <48D1FE8E.1020809@gmail.com> References: <48D1F07E.5090701@gmail.com> <0AEE2470-008B-445E-A5B5-763B04E1482A@saniq.com> <48D1FE8E.1020809@gmail.com> Message-ID: <48E56A38-01CC-44D9-A1C4-FEF42B2F144C@saniq.com> Usually you see the InvalidAuthenticityToken when stuff is being posted directly back to your server when you didn't really want to be. You'd need a :canvas => true in your url generation function in order to avoid that kind of problem. I'd really recommend checking out Mike's book http://pragprog.com/titles/mmfacer/developing-facebook-platform-applications-with-rails It's not on paper yet, but you can get the PDF version right now. It's well worth the cost -- it will get you up and running faster and with less frustration than the oft conflicting tutorials that are out there. On Sep 18, 2008, at 12:09 AM, Allen Walker wrote: > I'm now trying to do a "destroy". I do this: > > <%=link_to("Delete", url_for(:controller => "articles", :action => > "destroy", :id => article, :_method => :delete), :confirm => 'Are > you sure?' )%> > When i execute it, i get: > > > ActionController::InvalidAuthenticityToken in > ArticlesController#destroy > > ActionController::InvalidAuthenticityToken > > > If I comment out "protect_from_forgery :secret => 'xx'" in > application.rb I get when i just try to view the page: > > ActionView::TemplateError (No :secret given to the > #protect_from_forgery call. Set that or use a session store capable > of generating its own keys (Cookie Session Store).) > > > > > Tres Wong-Godfrey wrote: >> >> Try something like this: >> form_for :article, :url => { :action => "update", :id => >> @article }, :html => { :method => :put } do |f| >> >> That should give you the 'PUT' method. >> >> >> On Sep 17, 2008, at 11:09 PM, Allen Walker wrote: >> >>> This appears to be some kind of routing issue since facebook wraps >>> everything in a post... so here's what I'm doing: >>> >>> <% form_for :article, :url => { :action => "update", :id => >>> @article } do |f| >>> %> <%= >>> render :partial => "form", :locals => { :f => f } %> >>> <% end -%> >>> renders: >>> >>>
>>> >>> .... >>>
>>> The form comes up populated with the model data, but I submit >>> though I get: >>> >>> >>> Unknown action >>> >>> No action responded to 7 >>> >>> >>> >>> In the rake routes the "update" requires a HTTP "put" so I'm >>> wondering if that is causing the problem. >>> >>> thanks >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From auswalk at gmail.com Thu Sep 18 03:58:34 2008 From: auswalk at gmail.com (Allen Walker) Date: Thu, 18 Sep 2008 02:58:34 -0500 Subject: [Facebooker-talk] problem doing a CRUD update? In-Reply-To: <48E56A38-01CC-44D9-A1C4-FEF42B2F144C@saniq.com> References: <48D1F07E.5090701@gmail.com> <0AEE2470-008B-445E-A5B5-763B04E1482A@saniq.com> <48D1FE8E.1020809@gmail.com> <48E56A38-01CC-44D9-A1C4-FEF42B2F144C@saniq.com> Message-ID: <971598f90809180058p76e0d0ffv7c6eb4a9d9ea18d9@mail.gmail.com> Yeah that didn't work: <%=link_to("Delete", url_for(:controller => "articles", :action => "destroy", :id => a\rticle, :_method => :delete, :canvas=>true), :confirm => 'Are you sure?' )%> Still get: ActionController::InvalidAuthenticityToken in ArticlesController#destroy ActionController::InvalidAuthenticityToken In a form there is a hidden field for the token - autogenerated. In the link_to there isn't. And yes I own both the pdf and the book that hasn't been released ;) On Thu, Sep 18, 2008 at 2:49 AM, Tres Wong-Godfrey wrote: > > Usually you see the InvalidAuthenticityToken when stuff is being posted directly back to your server when you didn't really want to be. You'd need a :canvas => true in your url generation function in order to avoid that kind of problem. > > > I'd really recommend checking out Mike's book http://pragprog.com/titles/mmfacer/developing-facebook-platform-applications-with-rails > > It's not on paper yet, but you can get the PDF version right now. > > It's well worth the cost -- it will get you up and running faster and with less frustration than the oft conflicting tutorials that are out there. > > > > > On Sep 18, 2008, at 12:09 AM, Allen Walker wrote: > >> I'm now trying to do a "destroy". I do this: >> >> <%=link_to("Delete", url_for(:controller => "articles", :action => "destroy", :id => article, :_method => :delete), :confirm => 'Are you sure?' )%> >> When i execute it, i get: >> >> >> ActionController::InvalidAuthenticityToken in ArticlesController#destroy >> >> ActionController::InvalidAuthenticityToken >> >> >> If I comment out "protect_from_forgery :secret => 'xx'" in application.rb I get when i just try to view the page: >> >> ActionView::TemplateError (No :secret given to the #protect_from_forgery call. Set that or use a session store capable of generating its own keys (Cookie Session Store).) >> >> >> >> >> Tres Wong-Godfrey wrote: >>> >>> Try something like this: >>> form_for :article, :url => { :action => "update", :id => @article }, :html => { :method => :put } do |f| >>> >>> That should give you the 'PUT' method. >>> >>> >>> On Sep 17, 2008, at 11:09 PM, Allen Walker wrote: >>> >>>> This appears to be some kind of routing issue since facebook wraps everything in a post... so here's what I'm doing: >>>> >>>> <% form_for :article, :url => { :action => "update", :id => @article } do |f| %> <%= render :partial => "form", :locals => { :f => f } %> >>>> <% end -%> >>>> renders: >>>> >>>>
>>>> >>>> .... >>>>
>>>> The form comes up populated with the model data, but I submit though I get: >>>> >>>> >>>> Unknown action >>>> >>>> No action responded to 7 >>>> >>>> >>>> >>>> In the rake routes the "update" requires a HTTP "put" so I'm wondering if that is causing the problem. >>>> >>>> thanks >>>> _______________________________________________ >>>> Facebooker-talk mailing list >>>> Facebooker-talk at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >>> >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > -- http://auswalk.blogspot.com From tres.wong-godfrey at saniq.com Thu Sep 18 04:10:03 2008 From: tres.wong-godfrey at saniq.com (Tres Wong-Godfrey) Date: Thu, 18 Sep 2008 01:10:03 -0700 Subject: [Facebooker-talk] problem doing a CRUD update? In-Reply-To: <971598f90809180058p76e0d0ffv7c6eb4a9d9ea18d9@mail.gmail.com> References: <48D1F07E.5090701@gmail.com> <0AEE2470-008B-445E-A5B5-763B04E1482A@saniq.com> <48D1FE8E.1020809@gmail.com> <48E56A38-01CC-44D9-A1C4-FEF42B2F144C@saniq.com> <971598f90809180058p76e0d0ffv7c6eb4a9d9ea18d9@mail.gmail.com> Message-ID: <9348E682-00EC-49AC-B024-883AA2684D36@saniq.com> If you're using RESTful routes anyway, you could just try something like this: link_to "Delete", article_path(article, :canvas => true), :confirm => "Are you sure?", :method => :delete Peep Code has a nice and free cheat sheet for Rails RESTful resource routes. On Sep 18, 2008, at 12:58 AM, Allen Walker wrote: > Yeah that didn't work: > > <%=link_to("Delete", url_for(:controller => "articles", :action => > "destroy", :id => a\rticle, :_method => :delete, :canvas=>true), > :confirm => 'Are you sure?' )%> > > Still get: > > ActionController::InvalidAuthenticityToken in > ArticlesController#destroy > > ActionController::InvalidAuthenticityToken > > In a form there is a hidden field for the token - autogenerated. In > the link_to there isn't. > > And yes I own both the pdf and the book that hasn't been released ;) > > On Thu, Sep 18, 2008 at 2:49 AM, Tres Wong-Godfrey > wrote: >> >> Usually you see the InvalidAuthenticityToken when stuff is being >> posted directly back to your server when you didn't really want to >> be. You'd need a :canvas => true in your url generation function in >> order to avoid that kind of problem. >> >> >> I'd really recommend checking out Mike's book http://pragprog.com/titles/mmfacer/developing-facebook-platform-applications-with-rails >> >> It's not on paper yet, but you can get the PDF version right now. >> >> It's well worth the cost -- it will get you up and running faster >> and with less frustration than the oft conflicting tutorials that >> are out there. >> >> >> >> >> On Sep 18, 2008, at 12:09 AM, Allen Walker wrote: >> >>> I'm now trying to do a "destroy". I do this: >>> >>> <%=link_to("Delete", url_for(:controller => "articles", :action => >>> "destroy", :id => article, :_method => :delete), :confirm => 'Are >>> you sure?' )%> >>> When i execute it, i get: >>> >>> >>> ActionController::InvalidAuthenticityToken in >>> ArticlesController#destroy >>> >>> ActionController::InvalidAuthenticityToken >>> >>> >>> If I comment out "protect_from_forgery :secret => 'xx'" in >>> application.rb I get when i just try to view the page: >>> >>> ActionView::TemplateError (No :secret given to the >>> #protect_from_forgery call. Set that or use a session store >>> capable of generating its own keys (Cookie Session Store).) >>> >>> >>> >>> >>> Tres Wong-Godfrey wrote: >>>> >>>> Try something like this: >>>> form_for :article, :url => { :action => "update", :id => >>>> @article }, :html => { :method => :put } do |f| >>>> >>>> That should give you the 'PUT' method. >>>> >>>> >>>> On Sep 17, 2008, at 11:09 PM, Allen Walker wrote: >>>> >>>>> This appears to be some kind of routing issue since facebook >>>>> wraps everything in a post... so here's what I'm doing: >>>>> >>>>> <% form_for :article, :url => { :action => "update", :id => >>>>> @article } do |f| >>>>> %> <%= >>>>> render :partial => "form", :locals => { :f => f } %> >>>>> <% end -%> >>>>> renders: >>>>> >>>>>
>>>>> >>>>> .... >>>>>
>>>>> The form comes up populated with the model data, but I submit >>>>> though I get: >>>>> >>>>> >>>>> Unknown action >>>>> >>>>> No action responded to 7 >>>>> >>>>> >>>>> >>>>> In the rake routes the "update" requires a HTTP "put" so I'm >>>>> wondering if that is causing the problem. >>>>> >>>>> thanks >>>>> _______________________________________________ >>>>> Facebooker-talk mailing list >>>>> Facebooker-talk at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>> >>>> >>> >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > > > > -- > http://auswalk.blogspot.com > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From auswalk at gmail.com Thu Sep 18 04:38:01 2008 From: auswalk at gmail.com (Allen Walker) Date: Thu, 18 Sep 2008 03:38:01 -0500 Subject: [Facebooker-talk] problem doing a CRUD update? In-Reply-To: <9348E682-00EC-49AC-B024-883AA2684D36@saniq.com> References: <48D1F07E.5090701@gmail.com> <0AEE2470-008B-445E-A5B5-763B04E1482A@saniq.com> <48D1FE8E.1020809@gmail.com> <48E56A38-01CC-44D9-A1C4-FEF42B2F144C@saniq.com> <971598f90809180058p76e0d0ffv7c6eb4a9d9ea18d9@mail.gmail.com> <9348E682-00EC-49AC-B024-883AA2684D36@saniq.com> Message-ID: <971598f90809180138s48babf91wd0ab865545e6d8a2@mail.gmail.com> Thanks for help, and it appears what you say is correct --- but inside the facebook canvas it still thinks it's a show.. i.e it's going to /articles/:id and showing calling the show action.. even though i'm specifying the method as 'delete' here. here's what i have explicitly: %=link_to("Delete", article_path(article, :canvas=>true), :confirm => 'Are you sure?', :method => :delete )%> and here's what's generated : Delete Strangely it never even asks me "Are you sure?" On Thu, Sep 18, 2008 at 3:10 AM, Tres Wong-Godfrey wrote: > > If you're using RESTful routes anyway, you could just try something like > this: > > link_to "Delete", article_path(article, :canvas => true), :confirm => "Are > you sure?", :method => :delete > > Peep Code has a nice and free cheat sheet for Rails RESTful resource routes. > > > > On Sep 18, 2008, at 12:58 AM, Allen Walker wrote: > >> Yeah that didn't work: >> >> <%=link_to("Delete", url_for(:controller => "articles", :action => >> "destroy", :id => a\rticle, :_method => :delete, :canvas=>true), >> :confirm => 'Are you sure?' )%> >> >> Still get: >> >> ActionController::InvalidAuthenticityToken in ArticlesController#destroy >> >> ActionController::InvalidAuthenticityToken >> >> In a form there is a hidden field for the token - autogenerated. In >> the link_to there isn't. >> >> And yes I own both the pdf and the book that hasn't been released ;) >> >> On Thu, Sep 18, 2008 at 2:49 AM, Tres Wong-Godfrey >> wrote: >>> >>> Usually you see the InvalidAuthenticityToken when stuff is being posted >>> directly back to your server when you didn't really want to be. You'd need a >>> :canvas => true in your url generation function in order to avoid that kind >>> of problem. >>> >>> >>> I'd really recommend checking out Mike's book >>> http://pragprog.com/titles/mmfacer/developing-facebook-platform-applications-with-rails >>> >>> It's not on paper yet, but you can get the PDF version right now. >>> >>> It's well worth the cost -- it will get you up and running faster and >>> with less frustration than the oft conflicting tutorials that are out there. >>> >>> >>> >>> >>> On Sep 18, 2008, at 12:09 AM, Allen Walker wrote: >>> >>>> I'm now trying to do a "destroy". I do this: >>>> >>>> <%=link_to("Delete", url_for(:controller => "articles", :action => >>>> "destroy", :id => article, :_method => :delete), :confirm => 'Are you >>>> sure?' )%> >>>> When i execute it, i get: >>>> >>>> >>>> ActionController::InvalidAuthenticityToken in ArticlesController#destroy >>>> >>>> ActionController::InvalidAuthenticityToken >>>> >>>> >>>> If I comment out "protect_from_forgery :secret => 'xx'" in >>>> application.rb I get when i just try to view the page: >>>> >>>> ActionView::TemplateError (No :secret given to the #protect_from_forgery >>>> call. Set that or use a session store capable of generating its own keys >>>> (Cookie Session Store).) >>>> >>>> >>>> >>>> >>>> Tres Wong-Godfrey wrote: >>>>> >>>>> Try something like this: >>>>> form_for :article, :url => { :action => "update", :id => @article }, >>>>> :html => { :method => :put } do |f| >>>>> >>>>> That should give you the 'PUT' method. >>>>> >>>>> >>>>> On Sep 17, 2008, at 11:09 PM, Allen Walker wrote: >>>>> >>>>>> This appears to be some kind of routing issue since facebook wraps >>>>>> everything in a post... so here's what I'm doing: >>>>>> >>>>>> <% form_for :article, :url => { :action => "update", :id => @article } >>>>>> do |f| %> <%= render >>>>>> :partial => "form", :locals => { :f => f } %> >>>>>> <% end -%> >>>>>> renders: >>>>>> >>>>>>
>>>>>> >>>>>> .... >>>>>>
>>>>>> The form comes up populated with the model data, but I submit though I >>>>>> get: >>>>>> >>>>>> >>>>>> Unknown action >>>>>> >>>>>> No action responded to 7 >>>>>> >>>>>> >>>>>> >>>>>> In the rake routes the "update" requires a HTTP "put" so I'm wondering >>>>>> if that is causing the problem. >>>>>> >>>>>> thanks >>>>>> _______________________________________________ >>>>>> Facebooker-talk mailing list >>>>>> Facebooker-talk at rubyforge.org >>>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> Facebooker-talk mailing list >>>> Facebooker-talk at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >> >> >> >> -- >> http://auswalk.blogspot.com >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- http://auswalk.blogspot.com From tres.wong-godfrey at saniq.com Thu Sep 18 05:05:02 2008 From: tres.wong-godfrey at saniq.com (Tres Wong-Godfrey) Date: Thu, 18 Sep 2008 02:05:02 -0700 Subject: [Facebooker-talk] problem doing a CRUD update? In-Reply-To: <971598f90809180138s48babf91wd0ab865545e6d8a2@mail.gmail.com> References: <48D1F07E.5090701@gmail.com> <0AEE2470-008B-445E-A5B5-763B04E1482A@saniq.com> <48D1FE8E.1020809@gmail.com> <48E56A38-01CC-44D9-A1C4-FEF42B2F144C@saniq.com> <971598f90809180058p76e0d0ffv7c6eb4a9d9ea18d9@mail.gmail.com> <9348E682-00EC-49AC-B024-883AA2684D36@saniq.com> <971598f90809180138s48babf91wd0ab865545e6d8a2@mail.gmail.com> Message-ID: Facebook filters confirm() from javascript, so that makes sense. I'm sorry I didn't think about that before. I've personally had problems getting remote_link_to and link_to working the way I'd like using RESTful routes in Facebook. It's been easier just to define a dedicated named route with a :method => :any for what I needed done, or use a form. It's one of those things like FBJS -- you have to change the way you'd normally do things in order to accommodate Facebook's rules. On Sep 18, 2008, at 1:38 AM, Allen Walker wrote: > Thanks for help, and it appears what you say is correct --- but inside > the facebook canvas it still thinks it's a show.. i.e it's going to > /articles/:id and showing calling the show action.. even though i'm > specifying the method as 'delete' here. > > here's what i have explicitly: > > %=link_to("Delete", article_path(article, :canvas=>true), :confirm => > 'Are you sure?', :method => :delete )%> > > and here's what's generated : > > Delete > > > Strangely it never even asks me "Are you sure?" > > On Thu, Sep 18, 2008 at 3:10 AM, Tres Wong-Godfrey > wrote: >> >> If you're using RESTful routes anyway, you could just try something >> like >> this: >> >> link_to "Delete", article_path(article, :canvas => true), :confirm >> => "Are >> you sure?", :method => :delete >> >> Peep Code has a nice and free cheat sheet for Rails RESTful >> resource routes. >> >> >> >> On Sep 18, 2008, at 12:58 AM, Allen Walker wrote: >> >>> Yeah that didn't work: >>> >>> <%=link_to("Delete", url_for(:controller => "articles", :action => >>> "destroy", :id => a\rticle, :_method => :delete, :canvas=>true), >>> :confirm => 'Are you sure?' )%> >>> >>> Still get: >>> >>> ActionController::InvalidAuthenticityToken in >>> ArticlesController#destroy >>> >>> ActionController::InvalidAuthenticityToken >>> >>> In a form there is a hidden field for the token - autogenerated. In >>> the link_to there isn't. >>> >>> And yes I own both the pdf and the book that hasn't been released ;) >>> >>> On Thu, Sep 18, 2008 at 2:49 AM, Tres Wong-Godfrey >>> wrote: >>>> >>>> Usually you see the InvalidAuthenticityToken when stuff is being >>>> posted >>>> directly back to your server when you didn't really want to be. >>>> You'd need a >>>> :canvas => true in your url generation function in order to avoid >>>> that kind >>>> of problem. >>>> >>>> >>>> I'd really recommend checking out Mike's book >>>> http://pragprog.com/titles/mmfacer/developing-facebook-platform-applications-with-rails >>>> >>>> It's not on paper yet, but you can get the PDF version right now. >>>> >>>> It's well worth the cost -- it will get you up and running faster >>>> and >>>> with less frustration than the oft conflicting tutorials that are >>>> out there. >>>> >>>> >>>> >>>> >>>> On Sep 18, 2008, at 12:09 AM, Allen Walker wrote: >>>> >>>>> I'm now trying to do a "destroy". I do this: >>>>> >>>>> <%=link_to("Delete", url_for(:controller => "articles", :action => >>>>> "destroy", :id => article, :_method => :delete), :confirm => >>>>> 'Are you >>>>> sure?' )%> >>>>> When i execute it, i get: >>>>> >>>>> >>>>> ActionController::InvalidAuthenticityToken in >>>>> ArticlesController#destroy >>>>> >>>>> ActionController::InvalidAuthenticityToken >>>>> >>>>> >>>>> If I comment out "protect_from_forgery :secret => 'xx'" in >>>>> application.rb I get when i just try to view the page: >>>>> >>>>> ActionView::TemplateError (No :secret given to the >>>>> #protect_from_forgery >>>>> call. Set that or use a session store capable of generating its >>>>> own keys >>>>> (Cookie Session Store).) >>>>> >>>>> >>>>> >>>>> >>>>> Tres Wong-Godfrey wrote: >>>>>> >>>>>> Try something like this: >>>>>> form_for :article, :url => { :action => "update", :id => >>>>>> @article }, >>>>>> :html => { :method => :put } do |f| >>>>>> >>>>>> That should give you the 'PUT' method. >>>>>> >>>>>> >>>>>> On Sep 17, 2008, at 11:09 PM, Allen Walker wrote: >>>>>> >>>>>>> This appears to be some kind of routing issue since facebook >>>>>>> wraps >>>>>>> everything in a post... so here's what I'm doing: >>>>>>> >>>>>>> <% form_for :article, :url => { :action => "update", :id => >>>>>>> @article } >>>>>>> do |f| %> < >>>>>>> %= render >>>>>>> :partial => "form", :locals => { :f => f } %> >>>>>>> <% end -%> >>>>>>> renders: >>>>>>> >>>>>>>
>>>>>>> >>>>>>> .... >>>>>>>
>>>>>>> The form comes up populated with the model data, but I submit >>>>>>> though I >>>>>>> get: >>>>>>> >>>>>>> >>>>>>> Unknown action >>>>>>> >>>>>>> No action responded to 7 >>>>>>> >>>>>>> >>>>>>> >>>>>>> In the rake routes the "update" requires a HTTP "put" so I'm >>>>>>> wondering >>>>>>> if that is causing the problem. >>>>>>> >>>>>>> thanks >>>>>>> _______________________________________________ >>>>>>> Facebooker-talk mailing list >>>>>>> Facebooker-talk at rubyforge.org >>>>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>>> >>>>>> >>>>> >>>>> _______________________________________________ >>>>> Facebooker-talk mailing list >>>>> Facebooker-talk at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>> >>> >>> >>> >>> -- >>> http://auswalk.blogspot.com >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> > > > > -- > http://auswalk.blogspot.com > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk From mmangino at elevatedrails.com Thu Sep 18 07:59:19 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Thu, 18 Sep 2008 07:59:19 -0400 Subject: [Facebooker-talk] problem doing a CRUD update? In-Reply-To: <971598f90809180138s48babf91wd0ab865545e6d8a2@mail.gmail.com> References: <48D1F07E.5090701@gmail.com> <0AEE2470-008B-445E-A5B5-763B04E1482A@saniq.com> <48D1FE8E.1020809@gmail.com> <48E56A38-01CC-44D9-A1C4-FEF42B2F144C@saniq.com> <971598f90809180058p76e0d0ffv7c6eb4a9d9ea18d9@mail.gmail.com> <9348E682-00EC-49AC-B024-883AA2684D36@saniq.com> <971598f90809180138s48babf91wd0ab865545e6d8a2@mail.gmail.com> Message-ID: On Sep 18, 2008, at 4:38 AM, Allen Walker wrote: > Thanks for help, and it appears what you say is correct --- but inside > the facebook canvas it still thinks it's a show.. i.e it's going to > /articles/:id and showing calling the show action.. even though i'm > specifying the method as 'delete' here. > > here's what i have explicitly: > > %=link_to("Delete", article_path(article, :canvas=>true), :confirm => > 'Are you sure?', :method => :delete )%> > This isn't going to work. Unfortunately, Rails makes this work by using javascript to create a form inline using JavaScript. That same javascript won't run under Facebook. You can use a button_to which actually creates a real form (I believe) You can probably get the button styled to look like a link as well. I'd love to have a workaround for this, but I haven't figured one out yet. Mike > and here's what's generated : > > Delete > > > Strangely it never even asks me "Are you sure?" > > On Thu, Sep 18, 2008 at 3:10 AM, Tres Wong-Godfrey > wrote: >> >> If you're using RESTful routes anyway, you could just try something >> like >> this: >> >> link_to "Delete", article_path(article, :canvas => true), :confirm >> => "Are >> you sure?", :method => :delete >> >> Peep Code has a nice and free cheat sheet for Rails RESTful >> resource routes. >> >> >> >> On Sep 18, 2008, at 12:58 AM, Allen Walker wrote: >> >>> Yeah that didn't work: >>> >>> <%=link_to("Delete", url_for(:controller => "articles", :action => >>> "destroy", :id => a\rticle, :_method => :delete, :canvas=>true), >>> :confirm => 'Are you sure?' )%> >>> >>> Still get: >>> >>> ActionController::InvalidAuthenticityToken in >>> ArticlesController#destroy >>> >>> ActionController::InvalidAuthenticityToken >>> >>> In a form there is a hidden field for the token - autogenerated. In >>> the link_to there isn't. >>> >>> And yes I own both the pdf and the book that hasn't been released ;) >>> >>> On Thu, Sep 18, 2008 at 2:49 AM, Tres Wong-Godfrey >>> wrote: >>>> >>>> Usually you see the InvalidAuthenticityToken when stuff is being >>>> posted >>>> directly back to your server when you didn't really want to be. >>>> You'd need a >>>> :canvas => true in your url generation function in order to avoid >>>> that kind >>>> of problem. >>>> >>>> >>>> I'd really recommend checking out Mike's book >>>> http://pragprog.com/titles/mmfacer/developing-facebook-platform-applications-with-rails >>>> >>>> It's not on paper yet, but you can get the PDF version right now. >>>> >>>> It's well worth the cost -- it will get you up and running faster >>>> and >>>> with less frustration than the oft conflicting tutorials that are >>>> out there. >>>> >>>> >>>> >>>> >>>> On Sep 18, 2008, at 12:09 AM, Allen Walker wrote: >>>> >>>>> I'm now trying to do a "destroy". I do this: >>>>> >>>>> <%=link_to("Delete", url_for(:controller => "articles", :action => >>>>> "destroy", :id => article, :_method => :delete), :confirm => >>>>> 'Are you >>>>> sure?' )%> >>>>> When i execute it, i get: >>>>> >>>>> >>>>> ActionController::InvalidAuthenticityToken in >>>>> ArticlesController#destroy >>>>> >>>>> ActionController::InvalidAuthenticityToken >>>>> >>>>> >>>>> If I comment out "protect_from_forgery :secret => 'xx'" in >>>>> application.rb I get when i just try to view the page: >>>>> >>>>> ActionView::TemplateError (No :secret given to the >>>>> #protect_from_forgery >>>>> call. Set that or use a session store capable of generating its >>>>> own keys >>>>> (Cookie Session Store).) >>>>> >>>>> >>>>> >>>>> >>>>> Tres Wong-Godfrey wrote: >>>>>> >>>>>> Try something like this: >>>>>> form_for :article, :url => { :action => "update", :id => >>>>>> @article }, >>>>>> :html => { :method => :put } do |f| >>>>>> >>>>>> That should give you the 'PUT' method. >>>>>> >>>>>> >>>>>> On Sep 17, 2008, at 11:09 PM, Allen Walker wrote: >>>>>> >>>>>>> This appears to be some kind of routing issue since facebook >>>>>>> wraps >>>>>>> everything in a post... so here's what I'm doing: >>>>>>> >>>>>>> <% form_for :article, :url => { :action => "update", :id => >>>>>>> @article } >>>>>>> do |f| %> < >>>>>>> %= render >>>>>>> :partial => "form", :locals => { :f => f } %> >>>>>>> <% end -%> >>>>>>> renders: >>>>>>> >>>>>>>
>>>>>>> >>>>>>> .... >>>>>>>
>>>>>>> The form comes up populated with the model data, but I submit >>>>>>> though I >>>>>>> get: >>>>>>> >>>>>>> >>>>>>> Unknown action >>>>>>> >>>>>>> No action responded to 7 >>>>>>> >>>>>>> >>>>>>> >>>>>>> In the rake routes the "update" requires a HTTP "put" so I'm >>>>>>> wondering >>>>>>> if that is causing the problem. >>>>>>> >>>>>>> thanks >>>>>>> _______________________________________________ >>>>>>> Facebooker-talk mailing list >>>>>>> Facebooker-talk at rubyforge.org >>>>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>>> >>>>>> >>>>> >>>>> _______________________________________________ >>>>> Facebooker-talk mailing list >>>>> Facebooker-talk at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>> >>> >>> >>> >>> -- >>> http://auswalk.blogspot.com >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> > > > > -- > http://auswalk.blogspot.com > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From mmangino at elevatedrails.com Thu Sep 18 08:08:10 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Thu, 18 Sep 2008 08:08:10 -0400 Subject: [Facebooker-talk] Merb? In-Reply-To: References: <78C9B5AE-3518-44E8-B8F1-E1CA40D6163C@scidept.com> Message-ID: <228C20C6-8EFE-451E-B1EA-459EE8926F4A@elevatedrails.com> On Sep 17, 2008, at 10:10 PM, Joe Van Dyk wrote: > > You mean the same plugin could support both Rails and Merb? > I would take patches for that, especially if it helped to clean up the current initialization and adapter code. > And Merb would be a better fit for Facebook, right? That's probably a pretty personal thing :) We do more than 3 million hits a day through Rails with no problems. Mike > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com From chris at sliderguide.com Thu Sep 18 16:09:44 2008 From: chris at sliderguide.com (Chris Nurre) Date: Thu, 18 Sep 2008 16:09:44 -0400 Subject: [Facebooker-talk] FB API calls timing out In-Reply-To: References: Message-ID: Ooops - I realized I copied my code wrong in my post, but the problem is still the same. The code should look like this. def sync_user @fb_user = facebook_session.user @possible_matches = MyUserModel.find(:all, :conditions => ["last_name LIKE ?","%#{@fb_user.last_name}%"]) end Thanks for any help! Chris On Sep 18, 2008, at 1:32 PM, Chris Nurre wrote: > I have been working on a facebook app for a community of athletes > for the past few months, but after a brief break in developing I am > now constantly receiving timeouts when attempting to gather > information on the current facebook user. All I am trying to do is > get the facebook user's name so I can possible sync them with their > profile in my own database. > > ensure_application_is_installed_by_facebook_user > > def index > @fb_user = facebook_session.user > @possible_matches = MyUserModel.find(:all, :conditions => > ["last_name LIKE ?","%#{@current_facebook_user.last_name}%"]) > end > > I even removed the find and discovered the call of last_name(or any > value) on the facebook user is the issue. Below is a copy of the > error in log. It just appears that any call i make using the API is > timing out. > > Does anyone have any suggestions as to why the call to the api > would be timing out? Thanks - Chris > > Errno::ETIMEDOUT (Connection timed out - connect(2)): > /usr/local/lib/ruby/1.8/net/http.rb:560:in `initialize' > /usr/local/lib/ruby/1.8/net/http.rb:560:in `open' > /usr/local/lib/ruby/1.8/net/http.rb:560:in `connect' > /usr/local/lib/ruby/1.8/timeout.rb:48:in `timeout' > /usr/local/lib/ruby/1.8/timeout.rb:76:in `timeout' > /usr/local/lib/ruby/1.8/net/http.rb:560:in `connect' > /usr/local/lib/ruby/1.8/net/http.rb:553:in `do_start' > /usr/local/lib/ruby/1.8/net/http.rb:542:in `start' > /usr/local/lib/ruby/1.8/net/http.rb:404:in `post_form' > /vendor/plugins/facebooker/lib/facebooker/service.rb:18:in `post' > /vendor/plugins/facebooker/lib/facebooker/session.rb:466:in `post' > /vendor/plugins/facebooker/lib/facebooker/models/user.rb:111:in > `populate' > /vendor/plugins/facebooker/lib/facebooker/model.rb:35:in > `last_name' > /app/controllers/facebook_controller.rb:38:in `sync_user' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ > action_controller/base.rb:1162:in `send' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ > action_controller/base.rb:1162:in `perform_action_without_filters' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ > action_controller/filters.rb:580:in `call_filters' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ > action_controller/filters.rb:573:in `perform_action_without_benchmark' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ > action_controller/benchmarking.rb:68:in > `perform_action_without_rescue' > /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ > action_controller/benchmarking.rb:68:in > `perform_action_without_rescue' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ > action_controller/rescue.rb:201:in `perform_action_without_caching' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ > action_controller/caching/sql_cache.rb:13:in `perform_action' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/ > active_record/connection_adapters/abstract/query_cache.rb:33:in > `cache' > /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/ > active_record/query_cache.rb:8:in `cache' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ > action_controller/caching/sql_cache.rb:12:in `perform_action' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ > action_controller/base.rb:529:in `send' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ > action_controller/base.rb:529:in `process_without_filters' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ > action_controller/filters.rb:569:in > `process_without_session_management_support' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ > action_controller/session_management.rb:130:in `process' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ > action_controller/base.rb:389:in `process' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ > action_controller/dispatcher.rb:149:in `handle_request' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ > action_controller/dispatcher.rb:107:in `dispatch' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ > action_controller/dispatcher.rb:104:in `synchronize' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ > action_controller/dispatcher.rb:104:in `dispatch' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ > action_controller/dispatcher.rb:120:in `dispatch_cgi' > /usr/local/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/ > action_controller/dispatcher.rb:35:in `dispatch' > dispatch.cgi:10 From digidigo at gmail.com Thu Sep 18 16:36:12 2008 From: digidigo at gmail.com (David Clements) Date: Thu, 18 Sep 2008 14:36:12 -0600 Subject: [Facebooker-talk] Asynchronous Updates to Bebo In-Reply-To: <48D180EE.2090909@catch.fm> References: <48D180EE.2090909@catch.fm> Message-ID: Can you pass on some code? Are you calling FacebookAdapter.load_adapter(params )... This should set you up for which ever network you want to connect to? Dave On Wed, Sep 17, 2008 at 4:13 PM, dara wrote: > Hi, > > I'm looking at updating the profile outside of the call from bebo. > I have started using Starling/memcache, as per Mikes good book. > > However, when I get user.facebook_session, it is associated with facebook > and the next call (to set a ref handle fbml) fails of course. > > Could anyone give any pointers as to what else might be required, I've > tried a few things to get the session set up correctly in the rake task > through adapter usage, trying to base it on what happens in the intial > stages of a request from bebo, but so far I'm shooting in the dark here > really. > > Thanks if you can provide any tips > Dara > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aeon2012 at gmail.com Fri Sep 19 18:20:09 2008 From: aeon2012 at gmail.com (Anthony C. Eufemio) Date: Fri, 19 Sep 2008 15:20:09 -0700 Subject: [Facebooker-talk] Getting gender information Message-ID: What is the best way of getting a user and their friends gender information in facebooker? -AE -------------- next part -------------- An HTML attachment was scrubbed... URL: From auswalk at gmail.com Fri Sep 19 18:31:17 2008 From: auswalk at gmail.com (Allen Walker) Date: Fri, 19 Sep 2008 17:31:17 -0500 Subject: [Facebooker-talk] Getting gender information In-Reply-To: References: Message-ID: <971598f90809191531r1fb3d0ddg26702c889a10bcdf@mail.gmail.com> user.facebook_session.user.friends.collect {|x| x.sex} On Fri, Sep 19, 2008 at 5:20 PM, Anthony C. Eufemio wrote: > What is the best way of getting a user and their friends gender information > in facebooker? > > -AE > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > > -- http://auswalk.blogspot.com From pac at alum.mit.edu Fri Sep 26 07:54:15 2008 From: pac at alum.mit.edu (Paul Covell) Date: Fri, 26 Sep 2008 19:54:15 +0800 Subject: [Facebooker-talk] Form method=get signature failure Message-ID: Hi, this topic was originally posted here: http://forums.pragprog.com/forums/59/topics/917 Quick summary: forms created method=GET fail with a signature validation error: Facebooker::Session::IncorrectSignature (Facebooker::Session::IncorrectSignature): /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb: 146:in `verify_signature' /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb: 120:in `verified_facebook_params' /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb: 35:in `facebook_params' /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb: 63:in `valid_session_key_in_session?' /vendor/plugins/facebooker/lib/facebooker/rails/controller.rb: 41:in `session_already_secured?' ////// This can be reproduced with a small test application: rails test cd test script/plugin install git://github.com/mmangino/facebooker.git ruby script/generate controller home index search views/home/index.fbml.erb:

Home

<% form_tag(url_for(:action => :search), {:method=>:get}) do %>

<%= text_field_tag(:keyword, params[:keyword]) %>

Go

<% end %> app/controller/application.rb?added immediately below helper :all ensure_application_is_installed_by_facebook_user ensure_authenticated_to_facebook And then I set up my development server and tunnel as I do with normal development. The error is the same. Also, if I remove the :method => :get, the error does not occur. ////// I have done some additional digging tonight on the problem, and here is what I've learned: 1. The verify_signature is working correctly (as expected) and calculating on all values passed to it --- the calculation is actually rendering a result inconsistent with the fb_sig passed to it. 2. The hidden parameters from the form that appear in the URL are being faithfully transmitted through Facebook to Facebooker and showing up properly in verify_signature 3. A copy + paste of the "raw string" generated by a working GET and a failing GET are identical except the timestamp and the session expiration time (of course). You can test a working GET by removing the parameters from the URL letting facebook regenerate them. This way everything else is identical. ==> I can only conclude that the fb_sig sent by facebook is being calculated based on a different order of parameters or excluding some parameters, but I don't know how to go about finding which ones (except brute force yuck). I can't find any of the FB pages that offer any useful advice on this. Quick reference: Forms and Hidden Inputs: http://wiki.developers.facebook.com/index.php/UsageNotes/Forms How Facebook Authenticates: http://wiki.developers.facebook.com/index.php/How_Facebook_Authenticates_Your_Application Verifying the Signature: http://wiki.developers.facebook.com/index.php/Verifying_The_Signature -Paul From mmangino at elevatedrails.com Mon Sep 29 13:37:20 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Mon, 29 Sep 2008 13:37:20 -0400 Subject: [Facebooker-talk] 2 new screencasts on Facebook development Message-ID: <4B2B690B-9D21-4484-9543-35E014941A5B@elevatedrails.com> Hey everybody. I just wanted to announce 2 new screencasts on Facebook development with Facebooker and the facebooker_authentication plugin. You can see a preview at http://www.pragprog.com/screencasts/v-mmfacer/rails-development-for-the-facebook-platform These are aimed at beginners. I'm considering doing some more advanced ones. Email me if you have any suggested topics! Thanks, Mike -- Mike Mangino http://www.elevatedrails.com From jbresnik at gmail.com Tue Sep 30 15:51:12 2008 From: jbresnik at gmail.com (John Bresnik) Date: Tue, 30 Sep 2008 12:51:12 -0700 Subject: [Facebooker-talk] publish_user_action strangeness.. Message-ID: <3b8cec990809301251k59d3c8f4me105c5fa0a09e93@mail.gmail.com> For some bizarre reason I can only get images to show up in the feeds when the app is running on port 8000 (confirmed this a few times) - anyone else seen this? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From mmangino at elevatedrails.com Tue Sep 30 16:51:32 2008 From: mmangino at elevatedrails.com (Mike Mangino) Date: Tue, 30 Sep 2008 16:51:32 -0400 Subject: [Facebooker-talk] publish_user_action strangeness.. In-Reply-To: <3b8cec990809301251k59d3c8f4me105c5fa0a09e93@mail.gmail.com> References: <3b8cec990809301251k59d3c8f4me105c5fa0a09e93@mail.gmail.com> Message-ID: What do your image URLs look like? We are using images in feeds on port 80 with no problems. Mike On Sep 30, 2008, at 3:51 PM, John Bresnik wrote: > For some bizarre reason I can only get images to show up in the > feeds when the app is running on port 8000 (confirmed this a few > times) - anyone else seen this? > > Thanks > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk -- Mike Mangino http://www.elevatedrails.com