如何从youtube服务注销?

时间:2016-07-09 14:57:19

标签: c# youtube-api

我正在使用此代码来执行这些操作,但我不知道如何从其中注销并从其他帐户登录。

UserCredential credential;
using (var stream = GenerateStreamFromString(secret))
{
    credential = await GoogleWebAuthorizationBroker.AuthorizeAsync(
        GoogleClientSecrets.Load(stream).Secrets,
        // This OAuth 2.0 access scope allows for read-only access to the authenticated 
        // user's account, but not other types of account access.
        new[] { YouTubeService.Scope.Youtube, YouTubeService.Scope.YoutubeForceSsl, YouTubeService.Scope.Youtubepartner, YouTubeService.Scope.YoutubeUpload },
        email,
        CancellationToken.None,
        new FileDataStore(this.GetType().ToString())
    );
}

string accToken = credential.Token.AccessToken;


youtubeService = new YouTubeService(new BaseClientService.Initializer()
{
    HttpClientInitializer = credential,
    ApplicationName = this.GetType().ToString()
});

0 个答案:

没有答案