Phonegap + Rails to render the views. How does Facebook Connect work then?

Hi everyone,

I’m learning Phonegap and stumbled upon this solution which demonstrated
that views can be dynamically rendered through Rails hosted on Heroku:

It seems to be a good solution, but then I wonder how would Facebook
Connect work here then since the FB button will also be rendered from
dynamically? Would it require Childbrowser plugin?

Thank you!

One solution might be to hand off authentication to a native control,
the native FB SDK to authenticate and get the token, and then back to
PhoneGap webview. I’ve used this hybrid approach with Rails and
and it’s been a decent compromise. Use Rails for what it does well, but
leverage the full native stack if that works better.

Another approach would be to grab the Facebook Connect response either
Javascript injected into the PhoneGap view on the client side, or using
native WebView hooks that let you do a kind of man-in-the-middle
so that your native app gets the token instead of/in addition to the
app. Both Android and iOS webviews provide native hooks that let you do


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs