[Facebooker-talk] fb_comments and fb_board not working
Allen Walker
auswalk at gmail.com
Thu Sep 4 18:51:01 EDT 2008
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
>
>
>
>
More information about the Facebooker-talk
mailing list