Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

New Contributor
Posts: 6
Registered: ‎08-08-2013
My Device: BB7
My Carrier: Blackberry

Control over Browser from my BlackBerry 7 native application

           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!

Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Control over Browser from my BlackBerry 7 native application

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.



Follow me on Twitter: @n_adam_stanley
Your app doesn't work? Use BlackBerry remote web inspector to find out why.