One solution might be to hand off authentication to a native control, use
the native FB SDK to authenticate and get the token, and then back to the
PhoneGap webview. I've used this hybrid approach with Rails and PhoneGap,
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 with
Javascript injected into the PhoneGap view on the client side, or using the
native WebView hooks that let you do a kind of man-in-the-middle approach,
so that your native app gets the token instead of/in addition to the Rails
app. Both Android and iOS webviews provide native hooks that let you do
this.

Dave


On Mon, Nov 18, 2013 at 6:15 AM, Fai Wong <wongw...@gmail.com> wrote:

> Hi everyone,
>
> I'm learning Phonegap and stumbled upon this solution which demonstrated
> that views can be dynamically rendered through Rails hosted on Heroku:
> - http://stackoverflow.com/questions/11713997/using-phonegap-as-a-native-
> container-for-a-rails-3-app
>
> 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 Rails
> dynamically? Would it require Childbrowser plugin?
>
> Thank you!
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to rubyonrails-talk+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/4c6ea21c-7cc2-4c92-bdf8-230066140d09%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAN_2j6FBihf%2B_1jwXPmWZi9vB69eW6RpZ%2BXTJKYPw53mjxLnAQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to