09-13-2013 12:31 PM
Hi! I am making a BB7 native application with HTML5, jQuery Mobile and WebWorks. In my application I have to authenticate user from facebook. So, when ever a user selecting login as a facebook user from my native application, I am opening a browser and taking them to the facebook login page to authenticate. After completion of authentication, how can I come back to my native applicatiion. Becuse I don't have any control over opened browser. I have tried to open the url in iframe, but. Its not working. Thanks!
10-08-2013 10:17 AM
The best way to do this type of handshake between BlackBerry web app and an OAuth service provider like Facebook is to use a child browser control . The reason why is because the user context remains inside the app (rather than launching to the external browser app).
Unfortunately, WebWorks does not have a formal child browser extension.
However, PhoneGap does - which fully supports BlackBerry 7:
In this particular situation, I would actually recommend you consider porting your app to use PhoneGap. This will allow you to leverage the Child-browser extension but also make it easier to port that code to other BlackBerry platforms using Cordova / PhoneGap, such as BlackBerry 10.