gpt4 book ai didi

facebook-c#-sdk - 如何在没有浏览器的情况下在 C# 中为桌面应用程序登录/验证 facebook

转载 作者:行者123 更新时间:2023-12-04 08:36:47 24 4
gpt4 key购买 nike

我可以使用 Web 浏览器控件为桌面应用程序验证 Facebook。但是我想在没有浏览器的情况下登录。电子邮件和密码将通过 windows 窗体提供。我搜索了很多,但没有找到任何相关信息。

很多人说不可能,facebook不允许隐私政策。但是诸如 tweet deck 或 nimbuzz 之类的应用程序正在这样做。所以我认为这是可能的。

我想使用 Facebook 最新的 C# sdk。

最佳答案

这不可能。请参阅此链接:
https://developers.facebook.com/docs/authentication/
引用该链接:

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.


这不可能的原因是 facebook 使用 OAuth 协议(protocol)。有关 OAuth 协议(protocol)的更多详细信息,请访问:
https://www.rfc-editor.org/rfc/rfc5849
OAuth 背后的基本动机是,需要授权的资源不需要知道用户的凭据/身份。
您提出的建议(使用客户的用户名/密码)违反了 OAuth 协议(protocol)的基本原则,并且您不能(至少在法律上)通过 facebook 实现这一点。

关于facebook-c#-sdk - 如何在没有浏览器的情况下在 C# 中为桌面应用程序登录/验证 facebook,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7062084/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com