[Facebooker-talk] Avoiding remote API calls inside controller actions
Joe Van Dyk
joe at pinkpucker.net
Mon Jul 7 04:22:35 EDT 2008
On Thu, Jul 3, 2008 at 12:28 PM, Joe Van Dyk <joe at pinkpucker.net> wrote:
> On Wed, Jun 25, 2008 at 4:07 PM, Joe Van Dyk <joe at pinkpucker.net> wrote:
>> So, it's bad to do network API calls to FB inside a controller action, amirite?
>>
>> If I want to display the user's first name though, how do I do that
>> without making a FB API call? How about the user's friends that have
>> the application installed?
>>
>> I only have 2 mongrels running and I hate to have them both tied up
>> with Facebook API calls.
>
> I'm noticing that when a user first visits my FB app (canvas),
> facebook.auth.getSession is being called. Is that necessary?
>
> Is it possible (or advisable) to raise an exception anytime the
> facebook api is called from inside a controller action?
I'm noticing that facebook.auth.createToken and
facebook.auth.getSession are called from inside the controller actions
whenever someone comes to FB for the first time. Is there a way to
avoid this?
I'd really like to get all remote api calls to FB outside of
controller actions, I hate tying up mongrel or thin processes.
More information about the Facebooker-talk
mailing list