Is it possible to create a desktop app using facebook oauth 2.0 authentication without requiring a browser interaction?

后端 未结 6 797
死守一世寂寞
死守一世寂寞 2021-02-02 00:16

Is it possible to have a client app which can authenticate using Facebook but without requiring browser(I mean no embedded browser in the code)?? User inputs the username/passwo

相关标签:
6条回答
  • 2021-02-02 00:41

    Yes and no,

    I've had the same problem with my server. It was console only, so I had to make a solution. First I've logged in using the lobo java webbrowser. I've transfered the cookies of lobo to my server.

    0 讨论(0)
  • 2021-02-02 00:47

    I know this is an old question and it's answered but I thought 'horse mouth GET'. From Facebook: https://developers.facebook.com/docs/authentication/...

    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...[cont]

    0 讨论(0)
  • 2021-02-02 00:47

    Some good links in this regard: http://developers.facebook.com/blog/post/289/

    https://developers.google.com/identity-toolkit/ https://developers.google.com/accounts/docs/OpenID

    http://facebooktoolkit.codeplex.com/ http://csharpsdk.org/

    http://blogs.msdn.com/b/appfabric/

    0 讨论(0)
  • 2021-02-02 00:48

    Apparently now you can, if you're a beta tester for their newest feature: https://developers.facebook.com/docs/authentication/devices/ Reminds me of PIN's on Wifi

    0 讨论(0)
  • 2021-02-02 00:53

    absolutely yes, but, we'll need to know which programming language you want to use before we can give much advice.

    For example, it's possible using httpclient for java and python to encapsulate all the functionality you need, others can chime in with libraries that they use for C, C++, perl, etc.

    [edit]
    search for httpclient and how it's used with python. if you run wireshark on your system, you will be able to watch the data interchange (if you don't understand the http protocol completely) and then implement that in your code.
    [/edit]

    0 讨论(0)
  • 2021-02-02 00:56

    Actually the answer is absolutely not.

    In order to authorize your app a user has to enter their facebook username and facebook password on facebook site and you need web browser for this. There is no way to skip this step (you can't ask what their username and password are and then exchange it automatically for access token). You can read more about this here.

    0 讨论(0)
提交回复
热议问题