我正在使用xamarin在mac中开发一个应用程序,它需要与Google和FaceBook连接。我试图使用以下代码使用OAuth2Authenticator对用户进行身份验证:
var auth = new OAuth2Authenticator (
clientId: "myId.apps.googleusercontent.com",
clientSecret: "mysecred",
scope: "document",
authorizeUrl: new Uri ("https://accounts.google.com/o/oauth2/auth"),
redirectUrl: new Uri ("myredirect:oob"),
accessTokenUrl: new Uri ("https://accounts.google.com/o/oauth2/token"),
getUsernameAsync: null
); 当我试图使用auth.GetUI()方法获取url时,它会抛出
此平台不支持错误"WebAuthenticator“。
在Mac应用程序中还有其他连接Gmail或Facebook的方法吗?
发布于 2015-10-28 10:49:35
您可以选择像这个https://github.com/clancey/simpleauth这样的开放源代码库。
或者您必须编写一些现有MacOS库的绑定,但这将是一个真正的痛苦。
https://stackoverflow.com/questions/33388191
复制相似问题