[Facebooker-talk] fb_comments and fb_board not working

Jonathan Otto jonathan.otto at gmail.com
Mon Sep 8 01:38:37 EDT 2008


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
>>
>


More information about the Facebooker-talk mailing list