Search code examples
facebookxauth

connecting to Facebook via custom UI through using the xauth


I am working on a mac application which involves Facebook support so that they can share to Facebook via our app.

For this, I am using Facebook Graph API's which internally uses oAuth protocol to access user resources. In this process, it uses webview to enter users credentials(username and password) which provides the "Access_token".

But my requirement of the application is that it should not use webview to enter user credentials rather it should use other view controller to provide user credentials. So I need to go for xAuth protocol as in twitter uses.

Can anyone help me in this issue? If facebook supports xAuth, please make suggestions.


Solution

  • Facebook doesn't offer "desktop" application authentication support as detailed here: https://developers.facebook.com/docs/authentication/

    What you would have to do, is get them to authorize your app on a website, then use the access token for the desktop app and that is if your app is connected to some kind of server.

    Otherwise you will have to follow their suggestion of embedding a browser and reading the access token once it is received.