0

I want to add a Facebook log-in button in a hybrid page in worklight and deploy it in iOS.

So far, we tried to add the log-in button in the hybrid part of worklight(js/html), but the button is not displayed, and the sdk is not called. We`re thinking that we cannot implement the Facebook log-in in the hybrid page and deploy it as a iOS hybrid app, since when we deployed it as a web application and run it in a mobile web browser it was fine.

We tried to implement the whole page as native, but the UI is a little different from our previous hybrid pages, we are thinking to add just the native Facebook log-in button in a hybrid page, the page consists of back button, header, buttons, labels, text-boxes,etc. The Facebook log-in button is located at the middle.

Can we implement this in worklight? or do you have any suggestions how to implement the facebook log-in button?

Any help would be greatly appreciated. Thank you.

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
black1011
  • 284
  • 3
  • 18

1 Answers1

1

Well, adding a UIButton into a Web View sounds not very possible to me.

What you could do instead, though, is make the button actually invoke a Cordova plug-in. The plug-in will implement -- in Objective-C -- the whole authentication flow you want, and when done return the control the Hybrid application.

If you're using Worklight 6.2, you can look at using the new Send Action API to easily transition between Worklight's ViewController (which embeds the Web View) to your ViewController (if you need one), or to just do some native code processing. I'm pretty sure you'll be able to create the desired experience this way.

Related reading:

Community
  • 1
  • 1
Idan Adar
  • 44,156
  • 13
  • 50
  • 89