Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/333.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 使用PicasService.Query()时引发“令牌无效-无效令牌:安全令牌但未找到目标”错误_C#_Oauth 2.0_Google Oauth_Picasa - Fatal编程技术网

C# 使用PicasService.Query()时引发“令牌无效-无效令牌:安全令牌但未找到目标”错误

C# 使用PicasService.Query()时引发“令牌无效-无效令牌:安全令牌但未找到目标”错误,c#,oauth-2.0,google-oauth,picasa,C#,Oauth 2.0,Google Oauth,Picasa,我在尝试使用Oauth 2.0令牌使用PicasService.Queryquery方法时遇到上述错误。我正在尝试列出已验证用户帐户中的所有相册。 代码如下: 服务在哪里 我正在使用最新版本的Google.Gdata.Client、Google.Gdata.Extensions、Google.Gdata.Photos。除非OAuth 1.0完全被弃用,否则它在OAuth 1.0令牌上运行良好。 现在,在使用OAuth2.0实现用户身份验证之后,它将抛出以下错误 此错误是由于发出令牌请求时缺少某些

我在尝试使用Oauth 2.0令牌使用PicasService.Queryquery方法时遇到上述错误。我正在尝试列出已验证用户帐户中的所有相册。 代码如下:

服务在哪里

我正在使用最新版本的Google.Gdata.Client、Google.Gdata.Extensions、Google.Gdata.Photos。除非OAuth 1.0完全被弃用,否则它在OAuth 1.0令牌上运行良好。 现在,在使用OAuth2.0实现用户身份验证之后,它将抛出以下错误

此错误是由于发出令牌请求时缺少某些参数造成的,还是由于Google.Gdata库导致的?在网上找不到有关此错误的详细信息

PS:我正在使用为“本机”创建的客户端ID和客户端机密 谷歌开发者控制台中的应用程序

任何建议或建议都会大有帮助。提前谢谢你

        AlbumQuery query = new AlbumQuery(AlbumQuery.CreatePicasaUri(userId));
        PicasaFeed picasaAlbumList = service.Query(query);
    public static PicasaService service;
    Token invalid - Invalid token: Secure token but no target found