03-18-2012 05:11 AM
while Developers like me are now shifting From BB Java to Playbook Native , is there is any Facebook sdk for native platform, or Any work around.., i have searched but get nothing.., Also is Android facebook Sdk will work through Android RunTime on playbook or Not. ...
03-19-2012 11:35 AM
Currently you could use the libcurl library that comes with our NDK - for the RESTful Facebook APIs. You can find many examples on the web of how to use it with RESTful web services.
I haven't tried it myself but at a glance the Android Runtime should work with an app that uses the facebook Android SDK.
03-26-2012 05:12 PM
The current problem is that you need to authenticate your app with Facebook to allow access to the user's profile. This requires an interactive web browser element, which means instantiating some sort of web browser viewer. As far as I'm aware, this doesn't exist in the Native SDK currently. It does in the WebWorks and Adobe AIR SDKs.
08-07-2012 03:27 PM
Has anyone had any success implementing facebook with the Native SDK ?
Reading on the different Auth methods for facebook : https://developers.facebook.com/docs/authenticatio
from this list on the page :
Authentication in native Android apps
Authentication in native iOS apps
Authentication within a Page Tab on www.facebook.com
Authentication within a Canvas Page on apps.facebook.com
Authentication for Websites & Mobile Web apps using a Server (server-side flow)
Authentication for devices without access to a browser
The last one seems to be our case, and if you click it ( https://developers.facebook.com/docs/authenticatio
There's a notice at the top of the page stating that they are allowing this with just certain partners.
2 Questions :
1) Is it possible to do java code (android facebook sdk) within a Native SDK project in Momentics ?
2) Is there any other way at all to make this work since using the REST api as suggested by the Blackberry advisor seems like it is problematic at the authentication phase ?
08-07-2012 06:13 PM
Fb uses OAuth 2.0 authentification.
You can check google APi and search for Oauth playground, they have very good tool for testing. Workflow in every Oauth 2.0 authentification is same., so what should work on google API, should on FB too, just change the urls. There is some native C++ lib which implements Oauth 1.0 authentification, and i managed to use it in native app for Playbook on 2.0.1 NDK.. Source of this lib you can find on http://oauth.googlecode.com/svn/code/c/liboauth/
I successfully compiled it and use it for Oauth 1.0 (just need to open external browser for user to login to and from there to paste token inside your app). I know it is not elegant way, but it seems to be only one, or hard way would be to make some "thin client" hardcoded for Fb only and in it to implement user login to FB. That lib above could be used for Oauth 2.0 probably with minor changes (hashing, encoding, etc is same on 1.0 and 2.0).
08-08-2012 07:42 PM