我试图让示例代码在 VB .Net 中工作我导入了示例 Oauth。
google Drive 网站上的示例是在这里我将示例代码导入 VB.Net https://developers.google.com/drive/credentials
它有这两个参考
Imports Google.Apis.Oauth2.v2
Imports Google.Apis.Oauth2.v2.Data
我在上述库的下载中找不到库,并且在代码中出现错误:
Dim credentials As IAuthorizationState = ExchangeCode(authorizationCode)
Dim userInfo As Userinfo = GetUserInfo(credentials)
Dim userId As [String] = userInfo.Id
emailAddress = userInfo.Email
因为 userInfo 没有在任何地方定义。它在丢失的 .dll 文件中吗?
和
Dim userInfoService As New Oauth2Service(GetAuthenticatorFromState(credentials))
Dim userInfo As Userinfo = Nothing
找不到 Oauth2Service?
我在这里做错了什么?