How to use Facebook OAuth within Android native?
I'm using official Facebook Android SDK to integrate Facebook to my application. When it comes to authorize, the SDK use a custom dialog with Webview in it, loading facebook login page for user to enter username & password, this sounds OK.
However, when reading javadoc for the method "authorize" in Facebook.java (in the SDK package), I found that "Note that User credentials could be handled natively using the OAuth 2.0 Username and Password Flow, but this is not supported by this SDK"
How can I achieve this ?
Thanks in advance
Hum, I have not used the Facebook SDK yet, but I already coded communications with webservices based on OAuth 2.0 for the credentials; so my answer will not deal with Facebook specifically but with OAuth 2.0. What you need to communicate with an OAuth webservice is first to get a token, in order to get it you need to give to the webservice your private developer key & password & your clients password & login. I think that it is exactly what your documentation is talking about.
Note that good webservices provide an already written wrapper in order to do not have each developper rewritting the same wrapper. If you need a wrapper example, look at Soundcloud Official Wrapper on github.