7

I can authenticate Facebook for desktop application using web browser control. But I want to log in without the browser. Email and password will be given through windows form.I've searched a lot, but found nothing on this.

Many people saying that it's not possible, facebook won't allow for privacy policy. But applications like tweet deck or nimbuzz are doing that. So I think it's possible.

I want to use Facebook's Latest C# sdk.

Adam Wagner
  • 15,469
  • 7
  • 52
  • 66
AtanuCSE
  • 8,832
  • 14
  • 74
  • 112

2 Answers2

10

It is not possible. See this link: https://developers.facebook.com/docs/authentication/

To quote from that link:

Desktop Apps

Our OAuth 2.0 implementation does not include explicit desktop app support. However, if your desktop app can embed a web browser (most desktop frameworks such as .NET, AIR and Cocoa support embedding browsers), you can use the client-side flow with one modification: a specific redirect_uri. Rather than requiring desktop apps to host a web server and populate the Site URL in the Developer App, we provide a specific URL you can use with desktop apps: https://www.facebook.com/connect/login_success.html.

The reason that this is not possible is that facebook uses the OAuth protocol. More details on the OAuth protocol can be found at: https://www.rfc-editor.org/rfc/rfc5849

The fundamental motivation behind OAuth is so that the resource that needs authorization does not need to know the credentials/identity of users.

What you are proposing (taking in the clients username/password) goes against the fundamental tenets of the OAuth protocol and you cannot (at least legally) achieve this with facebook.

Community
  • 1
  • 1
Varun Chatterji
  • 5,059
  • 1
  • 23
  • 24
  • 4
    thanks bro for the response. Got it. But I'm still curious about how chatting software login user. they don't present any browser to the interface. – AtanuCSE Aug 17 '11 at 13:57
  • Your explanation is incorrect. OAuth does not require a browser, just http. – Nas Banov Aug 29 '15 at 23:39
2

Both of your examples actually do use browsers. Tweetdeck is AIR, and Nimbuzz is .NET, both of which have browsers built-in that are behind the scenes. There is one way to authenticate without a browser, but it's nasty.

ForceMagic
  • 6,230
  • 12
  • 66
  • 88
benthehutt
  • 480
  • 4
  • 7