在桌面应用程序中使用 Google OAuthUtil
我正在构建一个与 Google 通讯录交互的桌面应用程序。我一直在尝试使用谷歌提供的 OAuthUtil 来验证应用程序,但无法让它工作...
它似乎只适合 web 应用程序,因为您必须提供回调 url,我认为因为函数 OAuthUtil.GetUnauthorizedRequestToken 返回空白...
I am building a Desktop application that interacts with Google Contacts. I have been trying to authenticate the application using google supplied OAuthUtil, but cant get it to work...
it seems it is only suitable for webapplication because of the callback url you have to provide, I think that because the function OAuthUtil.GetUnauthorizedRequestToken returns void...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我对 C# 不太熟悉,或者我会尝试编写一些示例代码。但是,查看他们的文档时,您必须打开网络浏览器并检测您发送的任何回调。当您检测到回调时,您将重定向到客户端程序。
http://code.google.com/apis/accounts/docs/OAuthForInstalledApps.html
他们似乎正在努力向他们的服务器发出 REST 请求,这样你就不必拥有网络浏览器了。 http://sites.google.com/site/oauthgoog/UXFedLogin /nobrowser/input-capable-devices
即使对于没有网络浏览器的东西,他们当前的建议是提供一个 pin,然后让用户在设备上注册网络浏览器。
http://sites.google.com/site/oauthgoog/UXFedLogin/nobrowser
I'm not that familiar with C# or I'd try and write some example code. However, looking at their docs you have to open a web browser and detect whatever callback you sent. When you detect the callback you then redirect to the client program.
http://code.google.com/apis/accounts/docs/OAuthForInstalledApps.html
It seems they're working on being able to make a REST request to their servers so that you don't have to have a web browser. http://sites.google.com/site/oauthgoog/UXFedLogin/nobrowser/input-capable-devices
Even for things, without a web browser they're current suggestion is to provide a pin, which you then have the user register on a device with a web browser.
http://sites.google.com/site/oauthgoog/UXFedLogin/nobrowser