11-09-2012 04:51 AM
Hi there,
I try to create native app using facebook api using the webview to get the URL link to retrieve the access token. However, the webview won't display the redirected link from that API hence won't allow me get the result. I did try using the normal browser and it works fine. Really confused now, is it the webview on bb10 dev alpha not working properly with facebook redirect??
Anyone ever try to develop facebook connect App using bb10?? Please help....
note: I'm using cascade, bb10, dev alpha
Mike
12-05-2012 12:55 PM
The following sample application demonstrates how to integrate OAuth with FaceBook using Web Apis. It uses a JavaScript library called jsOAuth to simplify the OAuth process.
Although this sample is published in a WebWorks folder, it should also work in a Cascades + webview hybrid app as well (currently does not have any WebWorks-specific dependencies):
https://github.com/blackberry/BB10-WebWorks-Sample
Note, FaceBook requires an additional "piece" for its OAuth - you must provide an external URL that Facebook will redirect to once it has authenticated. This is unlike other service providers that use OAuth (such as Foursquare), where you can simply redirect back to local://index.html