It would sure be nice if these would work. I have the following in my home controller: <%= fb_board("golf_board1") %> it renders: <fb:board xid="golf_board1" /> 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
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: > > <fb:board xid="golf_board1" /> > > 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 >
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: <br /> <%= text_area_tag :body %> <br /> <%= hidden_field_tag :comment_receiver, @user.id %> <%= submit_tag ''Post'' %> <% end %> <div id="all_comments"> <%= render :partial=>"comments/comments" %> </div> I was missing the <div>...</div> 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 <auswalk at gmail.com> wrote:> It would sure be nice if these would work. > > I have the following in my home controller: > > <%= fb_board("golf_board1") %> > > it renders: > > <fb:board xid="golf_board1" /> > > 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
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 <fb:board> and <fb:comments> 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: <br /> > <%= text_area_tag :body %> <br /> > <%= hidden_field_tag :comment_receiver, @user.id %> > <%= submit_tag ''Post'' %> > <% end %> > > <div id="all_comments"> > <%= render :partial=>"comments/comments" %> > </div> > > I was missing the <div>...</div> 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 <auswalk at gmail.com> wrote: > >> It would sure be nice if these would work. >> >> I have the following in my home controller: >> >> <%= fb_board("golf_board1") %> >> >> it renders: >> >> <fb:board xid="golf_board1" /> >> >> 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 >> >> > > > >
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 <auswalk at gmail.com> 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 <fb:board> and <fb:comments> 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: <br /> >>> <%= text_area_tag :body %> <br /> >>> <%= hidden_field_tag :comment_receiver, @user.id %> >>> <%= submit_tag ''Post'' %> >>> <% end %> >>> >>> <div id="all_comments"> >>> <%= render :partial=>"comments/comments" %> >>> </div> >>> >>> I was missing the <div>...</div> 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 <auswalk at gmail.com> wrote: >>> >>> >>>> It would sure be nice if these would work. >>>> >>>> I have the following in my home controller: >>>> >>>> <%= fb_board("golf_board1") %> >>>> >>>> it renders: >>>> >>>> <fb:board xid="golf_board1" /> >>>> >>>> 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 >>>> _______________________________________________ >>>> >>>>
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 <auswalk at gmail.com> 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 <auswalk at gmail.com> 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 <fb:board> and <fb:comments> 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: <br /> >>>> <%= text_area_tag :body %> <br /> >>>> <%= hidden_field_tag :comment_receiver, @user.id %> >>>> <%= submit_tag ''Post'' %> >>>> <% end %> >>>> >>>> <div id="all_comments"> >>>> <%= render :partial=>"comments/comments" %> >>>> </div> >>>> >>>> I was missing the <div>...</div> 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 <auswalk at gmail.com> wrote: >>>> >>>> >>>>> >>>>> It would sure be nice if these would work. >>>>> >>>>> I have the following in my home controller: >>>>> >>>>> <%= fb_board("golf_board1") %> >>>>> >>>>> it renders: >>>>> >>>>> <fb:board xid="golf_board1" /> >>>>> >>>>> 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
David Clements
2008-Sep-04 16:09 UTC
[Facebooker-talk] fb_comments and fb_board not working
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 <zhao.lu.us at 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 <auswalk at gmail.com> 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 <auswalk at gmail.com> > 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 <fb:board> and <fb:comments> 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: <br /> > >>>> <%= text_area_tag :body %> <br /> > >>>> <%= hidden_field_tag :comment_receiver, @user.id %> > >>>> <%= submit_tag ''Post'' %> > >>>> <% end %> > >>>> > >>>> <div id="all_comments"> > >>>> <%= render :partial=>"comments/comments" %> > >>>> </div> > >>>> > >>>> I was missing the <div>...</div> 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 <auswalk at gmail.com> > wrote: > >>>> > >>>> > >>>>> > >>>>> It would sure be nice if these would work. > >>>>> > >>>>> I have the following in my home controller: > >>>>> > >>>>> <%= fb_board("golf_board1") %> > >>>>> > >>>>> it renders: > >>>>> > >>>>> <fb:board xid="golf_board1" /> > >>>>> > >>>>> 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: <http://rubyforge.org/pipermail/facebooker-talk/attachments/20080904/6e932480/attachment.html>
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 <digidigo at gmail.com> 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 <zhao.lu.us at 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 <auswalk at gmail.com> 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 <auswalk at gmail.com> >> 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 <fb:board> and <fb:comments> 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: <br /> >> >>>> <%= text_area_tag :body %> <br /> >> >>>> <%= hidden_field_tag :comment_receiver, @user.id %> >> >>>> <%= submit_tag ''Post'' %> >> >>>> <% end %> >> >>>> >> >>>> <div id="all_comments"> >> >>>> <%= render :partial=>"comments/comments" %> >> >>>> </div> >> >>>> >> >>>> I was missing the <div>...</div> 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 <auswalk at gmail.com> >> wrote: >> >>>> >> >>>> >> >>>>> >> >>>>> It would sure be nice if these would work. >> >>>>> >> >>>>> I have the following in my home controller: >> >>>>> >> >>>>> <%= fb_board("golf_board1") %> >> >>>>> >> >>>>> it renders: >> >>>>> >> >>>>> <fb:board xid="golf_board1" /> >> >>>>> >> >>>>> 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: <http://rubyforge.org/pipermail/facebooker-talk/attachments/20080904/b38efc96/attachment-0001.html>
David Clements
2008-Sep-04 16:56 UTC
[Facebooker-talk] fb_comments and fb_board not working
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 <auswalk at gmail.com> 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 <digidigo at gmail.com>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 <zhao.lu.us at 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 <auswalk at gmail.com> 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 <auswalk at gmail.com> >>> 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 <fb:board> and <fb:comments> 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: <br /> >>> >>>> <%= text_area_tag :body %> <br /> >>> >>>> <%= hidden_field_tag :comment_receiver, @user.id %> >>> >>>> <%= submit_tag ''Post'' %> >>> >>>> <% end %> >>> >>>> >>> >>>> <div id="all_comments"> >>> >>>> <%= render :partial=>"comments/comments" %> >>> >>>> </div> >>> >>>> >>> >>>> I was missing the <div>...</div> 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 <auswalk at gmail.com> >>> wrote: >>> >>>> >>> >>>> >>> >>>>> >>> >>>>> It would sure be nice if these would work. >>> >>>>> >>> >>>>> I have the following in my home controller: >>> >>>>> >>> >>>>> <%= fb_board("golf_board1") %> >>> >>>>> >>> >>>>> it renders: >>> >>>>> >>> >>>>> <fb:board xid="golf_board1" /> >>> >>>>> >>> >>>>> 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: <http://rubyforge.org/pipermail/facebooker-talk/attachments/20080904/ade577ff/attachment.html>
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 <digidigo at gmail.com> 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 <auswalk at gmail.com> 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 <digidigo at gmail.com>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 <zhao.lu.us at 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 <auswalk at gmail.com> >>>> 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 <auswalk at gmail.com> >>>> 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 <fb:board> and <fb:comments> 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: <br /> >>>> >>>> <%= text_area_tag :body %> <br /> >>>> >>>> <%= hidden_field_tag :comment_receiver, @user.id %> >>>> >>>> <%= submit_tag ''Post'' %> >>>> >>>> <% end %> >>>> >>>> >>>> >>>> <div id="all_comments"> >>>> >>>> <%= render :partial=>"comments/comments" %> >>>> >>>> </div> >>>> >>>> >>>> >>>> I was missing the <div>...</div> 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 <auswalk at gmail.com> >>>> wrote: >>>> >>>> >>>> >>>> >>>> >>>>> >>>> >>>>> It would sure be nice if these would work. >>>> >>>>> >>>> >>>>> I have the following in my home controller: >>>> >>>>> >>>> >>>>> <%= fb_board("golf_board1") %> >>>> >>>>> >>>> >>>>> it renders: >>>> >>>>> >>>> >>>>> <fb:board xid="golf_board1" /> >>>> >>>>> >>>> >>>>> 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: <http://rubyforge.org/pipermail/facebooker-talk/attachments/20080904/9e9ad966/attachment-0001.html>
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 <auswalk at gmail.com > <mailto:auswalk at gmail.com>> 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 > <digidigo at gmail.com <mailto:digidigo at gmail.com>> 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 > <auswalk at gmail.com <mailto:auswalk at gmail.com>> 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 > <digidigo at gmail.com <mailto:digidigo at gmail.com>> 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 <zhao.lu.us > <http://zhao.lu.us>@gmail.com <http://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 > <auswalk at gmail.com <mailto:auswalk at gmail.com>> 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 > <auswalk at gmail.com <mailto:auswalk at gmail.com>> 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 <fb:board> and > <fb:comments> 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: <br /> > >>>> <%= text_area_tag :body %> <br /> > >>>> <%= hidden_field_tag :comment_receiver, > @user.id <http://user.id> %> > >>>> <%= submit_tag ''Post'' %> > >>>> <% end %> > >>>> > >>>> <div id="all_comments"> > >>>> <%= render :partial=>"comments/comments" %> > >>>> </div> > >>>> > >>>> I was missing the <div>...</div> 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 > <auswalk at gmail.com <mailto:auswalk at gmail.com>> wrote: > >>>> > >>>> > >>>>> > >>>>> It would sure be nice if these would work. > >>>>> > >>>>> I have the following in my home controller: > >>>>> > >>>>> <%= fb_board("golf_board1") %> > >>>>> > >>>>> it renders: > >>>>> > >>>>> <fb:board xid="golf_board1" /> > >>>>> > >>>>> 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 > <mailto:Facebooker-talk at rubyforge.org> > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > -- > Zhao > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > <mailto: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 <mailto:Facebooker-talk at rubyforge.org> > http://rubyforge.org/mailman/listinfo/facebooker-talk > >
Have you tried the absolute basics? <fb:board xid="titans_board" canpost="true" candelete="false" canmark="false" cancreatetopic="true" numtopics="5" returnurl="http://apps.facebook.com/myapp/titans/ "> <fb:title>Discuss the Titans</fb:title> </fb:board> 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 <auswalk at gmail.com <mailto:auswalk at gmail.com >> >> 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 >> <digidigo at gmail.com <mailto:digidigo at gmail.com>> 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 >> <auswalk at gmail.com <mailto:auswalk at gmail.com>> 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 >> <digidigo at gmail.com <mailto:digidigo at gmail.com>> 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 <zhao.lu.us >> <http://zhao.lu.us>@gmail.com <http://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 >> <auswalk at gmail.com <mailto:auswalk at gmail.com>> >> 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 >> <auswalk at gmail.com <mailto:auswalk at gmail.com>> >> 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 <fb:board> and >> <fb:comments> 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: <br /> >> >>>> <%= text_area_tag :body %> <br /> >> >>>> <%= hidden_field_tag :comment_receiver, >> @user.id <http://user.id> %> >> >>>> <%= submit_tag ''Post'' %> >> >>>> <% end %> >> >>>> >> >>>> <div id="all_comments"> >> >>>> <%= render :partial=>"comments/comments" %> >> >>>> </div> >> >>>> >> >>>> I was missing the <div>...</div> 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 >> <auswalk at gmail.com <mailto:auswalk at gmail.com>> >> wrote: >> >>>> >> >>>> >> >>>>> >> >>>>> It would sure be nice if these would work. >> >>>>> >> >>>>> I have the following in my home controller: >> >>>>> >> >>>>> <%= fb_board("golf_board1") %> >> >>>>> >> >>>>> it renders: >> >>>>> >> >>>>> <fb:board xid="golf_board1" /> >> >>>>> >> >>>>> 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 >> <mailto:Facebooker-talk at rubyforge.org> >> > >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> > >> >> >> >> -- >> Zhao >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> <mailto: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 <mailto: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
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? > > <fb:board xid="titans_board" canpost="true" candelete="false" > canmark="false" cancreatetopic="true" numtopics="5" > returnurl="http://apps.facebook.com/myapp/titans/"> <fb:title>Discuss > the Titans</fb:title> </fb:board> > > 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 <auswalk at gmail.com >>> <mailto:auswalk at gmail.com>> 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 >>> <digidigo at gmail.com <mailto:digidigo at gmail.com>> 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 >>> <auswalk at gmail.com <mailto:auswalk at gmail.com>> 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 >>> <digidigo at gmail.com <mailto:digidigo at gmail.com>> 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 <zhao.lu.us >>> <http://zhao.lu.us>@gmail.com <http://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 >>> <auswalk at gmail.com <mailto:auswalk at gmail.com>> >>> 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 >>> <auswalk at gmail.com <mailto:auswalk at gmail.com>> >>> 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 <fb:board> and >>> <fb:comments> 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: <br /> >>> >>>> <%= text_area_tag :body %> <br /> >>> >>>> <%= hidden_field_tag :comment_receiver, >>> @user.id <http://user.id> %> >>> >>>> <%= submit_tag ''Post'' %> >>> >>>> <% end %> >>> >>>> >>> >>>> <div id="all_comments"> >>> >>>> <%= render :partial=>"comments/comments" %> >>> >>>> </div> >>> >>>> >>> >>>> I was missing the <div>...</div> 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 >>> <auswalk at gmail.com <mailto:auswalk at gmail.com>> >>> wrote: >>> >>>> >>> >>>> >>> >>>>> >>> >>>>> It would sure be nice if these would work. >>> >>>>> >>> >>>>> I have the following in my home controller: >>> >>>>> >>> >>>>> <%= fb_board("golf_board1") %> >>> >>>>> >>> >>>>> it renders: >>> >>>>> >>> >>>>> <fb:board xid="golf_board1" /> >>> >>>>> >>> >>>>> 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 >>> <mailto:Facebooker-talk at rubyforge.org> >>> > >>> >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> > >>> >>> >>> >>> -- >>> Zhao >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> <mailto: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 <mailto: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 > > > >
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: <fb:board xid="titans_board" canpost="true" candelete="false" canmark="false" cancreatetopic="true" numtopics="5" returnurl="http://apps.facebook.com/myapp/home/"> <fb:title>Discuss the Titans</fb:title> </fb:board> 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? > > <fb:board xid="titans_board" canpost="true" candelete="false" > canmark="false" cancreatetopic="true" numtopics="5" > returnurl="http://apps.facebook.com/myapp/titans/"> <fb:title>Discuss > the Titans</fb:title> </fb:board> > > 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 <auswalk at gmail.com >>> <mailto:auswalk at gmail.com>> 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 >>> <digidigo at gmail.com <mailto:digidigo at gmail.com>> 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 >>> <auswalk at gmail.com <mailto:auswalk at gmail.com>> 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 >>> <digidigo at gmail.com <mailto:digidigo at gmail.com>> 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 <zhao.lu.us >>> <http://zhao.lu.us>@gmail.com <http://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 >>> <auswalk at gmail.com <mailto:auswalk at gmail.com>> >>> 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 >>> <auswalk at gmail.com <mailto:auswalk at gmail.com>> >>> 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 <fb:board> and >>> <fb:comments> 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: <br /> >>> >>>> <%= text_area_tag :body %> <br /> >>> >>>> <%= hidden_field_tag :comment_receiver, >>> @user.id <http://user.id> %> >>> >>>> <%= submit_tag ''Post'' %> >>> >>>> <% end %> >>> >>>> >>> >>>> <div id="all_comments"> >>> >>>> <%= render :partial=>"comments/comments" %> >>> >>>> </div> >>> >>>> >>> >>>> I was missing the <div>...</div> 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 >>> <auswalk at gmail.com <mailto:auswalk at gmail.com>> >>> wrote: >>> >>>> >>> >>>> >>> >>>>> >>> >>>>> It would sure be nice if these would work. >>> >>>>> >>> >>>>> I have the following in my home controller: >>> >>>>> >>> >>>>> <%= fb_board("golf_board1") %> >>> >>>>> >>> >>>>> it renders: >>> >>>>> >>> >>>>> <fb:board xid="golf_board1" /> >>> >>>>> >>> >>>>> 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 >>> <mailto:Facebooker-talk at rubyforge.org> >>> > >>> >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> > >>> >>> >>> >>> -- >>> Zhao >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> <mailto: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 <mailto: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 > > > >
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: > > <fb:board xid="titans_board" canpost="true" candelete="false" > canmark="false" cancreatetopic="true" numtopics="5" returnurl="http://apps.facebook.com/myapp/home/ > "> <fb:title>Discuss the Titans</fb:title> </fb:board> > > 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? >> >> <fb:board xid="titans_board" canpost="true" candelete="false" >> canmark="false" cancreatetopic="true" numtopics="5" returnurl="http://apps.facebook.com/myapp/titans/ >> "> <fb:title>Discuss the Titans</fb:title> </fb:board> >> >> 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 <auswalk at gmail.com <mailto:auswalk at gmail.com >>>> >> 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 >>>> <digidigo at gmail.com <mailto:digidigo at gmail.com>> 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 >>>> <auswalk at gmail.com <mailto:auswalk at gmail.com>> 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 >>>> <digidigo at gmail.com <mailto:digidigo at gmail.com>> 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 <zhao.lu.us >>>> <http://zhao.lu.us>@gmail.com <http://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 >>>> <auswalk at gmail.com <mailto:auswalk at gmail.com>> >>>> 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 >>>> <auswalk at gmail.com <mailto:auswalk at gmail.com>> >>>> 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 <fb:board> and >>>> <fb:comments> 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: <br /> >>>> >>>> <%= text_area_tag :body %> <br /> >>>> >>>> <%= hidden_field_tag :comment_receiver, >>>> @user.id <http://user.id> %> >>>> >>>> <%= submit_tag ''Post'' %> >>>> >>>> <% end %> >>>> >>>> >>>> >>>> <div id="all_comments"> >>>> >>>> <%= render :partial=>"comments/comments" %> >>>> >>>> </div> >>>> >>>> >>>> >>>> I was missing the <div>...</div> 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 >>>> <auswalk at gmail.com <mailto:auswalk at gmail.com>> >>>> wrote: >>>> >>>> >>>> >>>> >>>> >>>>> >>>> >>>>> It would sure be nice if these would work. >>>> >>>>> >>>> >>>>> I have the following in my home controller: >>>> >>>>> >>>> >>>>> <%= fb_board("golf_board1") %> >>>> >>>>> >>>> >>>>> it renders: >>>> >>>>> >>>> >>>>> <fb:board xid="golf_board1" /> >>>> >>>>> >>>> >>>>> 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 >>>> <mailto:Facebooker-talk at rubyforge.org> >>>> > >>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>> > >>>> >>>> >>>> >>>> -- >>>> Zhao >>>> _______________________________________________ >>>> Facebooker-talk mailing list >>>> Facebooker-talk at rubyforge.org >>>> <mailto: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 <mailto: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
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: >> >> <fb:board xid="titans_board" canpost="true" candelete="false" >> canmark="false" cancreatetopic="true" numtopics="5" >> returnurl="http://apps.facebook.com/myapp/home/"> <fb:title>Discuss >> the Titans</fb:title> </fb:board> >> >> 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? >>> >>> <fb:board xid="titans_board" canpost="true" candelete="false" >>> canmark="false" cancreatetopic="true" numtopics="5" >>> returnurl="http://apps.facebook.com/myapp/titans/"> >>> <fb:title>Discuss the Titans</fb:title> </fb:board> >>> >>> 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 <auswalk at gmail.com >>>>> <mailto:auswalk at gmail.com>> 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 >>>>> <digidigo at gmail.com <mailto:digidigo at gmail.com>> 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 >>>>> <auswalk at gmail.com <mailto:auswalk at gmail.com>> 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 >>>>> <digidigo at gmail.com <mailto:digidigo at gmail.com>> 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 <zhao.lu.us >>>>> <http://zhao.lu.us>@gmail.com <http://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 >>>>> <auswalk at gmail.com <mailto:auswalk at gmail.com>> >>>>> 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 >>>>> <auswalk at gmail.com <mailto:auswalk at gmail.com>> >>>>> 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 <fb:board> and >>>>> <fb:comments> 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: <br /> >>>>> >>>> <%= text_area_tag :body %> <br /> >>>>> >>>> <%= hidden_field_tag :comment_receiver, >>>>> @user.id <http://user.id> %> >>>>> >>>> <%= submit_tag ''Post'' %> >>>>> >>>> <% end %> >>>>> >>>> >>>>> >>>> <div id="all_comments"> >>>>> >>>> <%= render :partial=>"comments/comments" %> >>>>> >>>> </div> >>>>> >>>> >>>>> >>>> I was missing the <div>...</div> 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 >>>>> <auswalk at gmail.com <mailto:auswalk at gmail.com>> >>>>> wrote: >>>>> >>>> >>>>> >>>> >>>>> >>>>> >>>>> >>>>> It would sure be nice if these would work. >>>>> >>>>> >>>>> >>>>> I have the following in my home controller: >>>>> >>>>> >>>>> >>>>> <%= fb_board("golf_board1") %> >>>>> >>>>> >>>>> >>>>> it renders: >>>>> >>>>> >>>>> >>>>> <fb:board xid="golf_board1" /> >>>>> >>>>> >>>>> >>>>> 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 >>>>> <mailto:Facebooker-talk at rubyforge.org> >>>>> > >>>>> >>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>> > >>>>> >>>>> >>>>> >>>>> -- >>>>> Zhao >>>>> _______________________________________________ >>>>> Facebooker-talk mailing list >>>>> Facebooker-talk at rubyforge.org >>>>> <mailto: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 >>>>> <mailto: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 > > > >
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
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
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 > > > >
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 > > > >
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 > > > >
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 <auswalk at gmail.com > <mailto:auswalk at gmail.com>> 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 > <mailto: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 <mailto:Facebooker-talk at rubyforge.org> > http://rubyforge.org/mailman/listinfo/facebooker-talk > >
Jonathan Otto
2008-Sep-08 05:27 UTC
[Facebooker-talk] fb_comments and fb_board not working
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 <auswalk at gmail.com> 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 <auswalk at gmail.com >> <mailto:auswalk at gmail.com>> 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 >> <mailto: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 <mailto: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 >
Jonathan Otto
2008-Sep-08 05:38 UTC
[Facebooker-talk] fb_comments and fb_board not working
Here is the exact code: <fb:comments xid="my_wall" callbackurl="<%= user_url @user, :_method => :get %>"><fb:title>some title</fb:title><fb:comments> On Mon, Sep 8, 2008 at 12:27 AM, Jonathan Otto <jonathan.otto at gmail.com> 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 <auswalk at gmail.com> 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 <auswalk at gmail.com >>> <mailto:auswalk at gmail.com>> 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 >>> <mailto: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 <mailto: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 >> >
I tried the following it posts don''t take: <fb:comments xid="my_wall" callbackurl="<%= url_for(:controller => "home", :action=>"index", :only_path => false, :conditions => {:_method => :get}) %>"><fb:title>some title</fb:title><fb:comments> Jonathan Otto wrote:> Here is the exact code: > > <fb:comments xid="my_wall" callbackurl="<%= user_url @user, :_method > => :get %>"><fb:title>some title</fb:title><fb:comments> > > On Mon, Sep 8, 2008 at 12:27 AM, Jonathan Otto <jonathan.otto at gmail.com> 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 <auswalk at gmail.com> 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 <auswalk at gmail.com >>>> <mailto:auswalk at gmail.com>> 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 >>>> <mailto: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 <mailto: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 >>> >>> > >
The following DOES work: <fb:comments xid="my_wall" callbackurl="<%= url_for(:controller => "home", :action=>"index", :only_path => false, :_method => :get) %>"><fb:title>some title</fb:title><fb:comments> Allen Walker wrote:> I tried the following it posts don''t take: > > <fb:comments xid="my_wall" callbackurl="<%= url_for(:controller => > "home", :action=>"index", :only_path => false, :conditions => > {:_method => :get}) %>"><fb:title>some title</fb:title><fb:comments> > > Jonathan Otto wrote: >> Here is the exact code: >> >> <fb:comments xid="my_wall" callbackurl="<%= user_url @user, :_method >> => :get %>"><fb:title>some title</fb:title><fb:comments> >> >> On Mon, Sep 8, 2008 at 12:27 AM, Jonathan Otto >> <jonathan.otto at gmail.com> 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 <auswalk at gmail.com> >>> 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 <auswalk at gmail.com >>>>> <mailto:auswalk at gmail.com>> 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 >>>>> <mailto: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 >>>>> <mailto: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 >>>> >>>> >> >> > >
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: > > <fb:comments xid="my_wall" callbackurl="<%= url_for(:controller => > "home", :action=>"index", :only_path => false, :_method => :get) > %>"><fb:title>some title</fb:title><fb:comments> > > Allen Walker wrote: >> I tried the following it posts don''t take: >> >> <fb:comments xid="my_wall" callbackurl="<%= url_for(:controller => >> "home", :action=>"index", :only_path => false, :conditions => >> {:_method => :get}) %>"><fb:title>some title</fb:title><fb:comments> >> >> Jonathan Otto wrote: >>> Here is the exact code: >>> >>> <fb:comments xid="my_wall" callbackurl="<%= user_url @user, :_method >>> => :get %>"><fb:title>some title</fb:title><fb:comments> >>> >>> On Mon, Sep 8, 2008 at 12:27 AM, Jonathan Otto >>> <jonathan.otto at gmail.com> 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 <auswalk at gmail.com> >>>> 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 <auswalk at gmail.com >>>>>> <mailto:auswalk at gmail.com>> 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 >>>>>> <mailto: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 >>>>>> <mailto: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 >>>>> >>>>> >>> >>> >> >> > >
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: >> >> <fb:comments xid="my_wall" callbackurl="<%= url_for(:controller => >> "home", :action=>"index", :only_path => false, :_method => :get) >> %>"><fb:title>some title</fb:title><fb:comments> >> >> Allen Walker wrote: >>> I tried the following it posts don''t take: >>> >>> <fb:comments xid="my_wall" callbackurl="<%= url_for(:controller => >>> "home", :action=>"index", :only_path => false, :conditions => >>> {:_method => :get}) %>"><fb:title>some title</fb:title><fb:comments> >>> >>> Jonathan Otto wrote: >>>> Here is the exact code: >>>> >>>> <fb:comments xid="my_wall" callbackurl="<%= user_url >>>> @user, :_method >>>> => :get %>"><fb:title>some title</fb:title><fb:comments> >>>> >>>> On Mon, Sep 8, 2008 at 12:27 AM, Jonathan Otto <jonathan.otto at gmail.com >>>> > 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 >>>>> <auswalk at gmail.com> 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 <auswalk at gmail.com >>>>>>> <mailto:auswalk at gmail.com>> 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 >>>>>>> <mailto: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 <mailto: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