[Facebooker-talk] link_to_remote with 401 error code

Josh Sharpe josh.m.sharpe at gmail.com
Sat Jan 3 19:39:48 EST 2009


link_to_remote works just fine.  You need to make sure that the URL you are
hitting is a fully qualified url since the facebook API doesn't play nice
with AJAX calls.  The URL should be hitting your app directly.

On Sat, Jan 3, 2009 at 5:26 PM, Tres Wong-Godfrey <
tres.wong-godfrey at saniq.com> wrote:

>
> link_to_remote doesn't work with Facebooker. You can use remote_form_for
> and some CSS magic to get the same outcome.
>
>
>
> On Jan 3, 2009, at 1:15 PM, shahzad bhatti wrote:
>
>  I am trying to use link_to_remote to send ajax request to my server, where
>> my code looks like:
>>
>>
>>
>> <%= link_to_remote( image_tag("image"), :update => div_id, :url =>
>> my_url(post, :canvas => false), :method => :get, :html => {:class =>
>> "button"}, :before => "$('spinner').show()", :complete =>
>> "$('spinner').hide()" ) %>
>>
>>
>>
>>
>>
>> However, since canvas is false, facebook doesn't send authorization the
>> facebooker filters rejects the request with 401 error. I don't want to skip
>> ensure_authenticated_to_facebook filter, but how do I fix this?
>>
>> Thanks.
>>
>>
>>
>> -Shahzad
>>
>> _______________________________________________
>> Facebooker-talk mailing list
>> Facebooker-talk at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/facebooker-talk
>>
>
> _______________________________________________
> Facebooker-talk mailing list
> Facebooker-talk at rubyforge.org
> http://rubyforge.org/mailman/listinfo/facebooker-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/facebooker-talk/attachments/20090103/997d5be9/attachment.html>


More information about the Facebooker-talk mailing list