1

YouTube에 동영상을 업로드하려고하는데 어쨌든 Xamarin.Forms (Portable) 프로젝트에서 작동하지 않습니다. Xamarin.Forms (Portable)YouTube에 동영상을 업로드하는 방법 [Xamarin.Forms (Portable)]

var initializer = new GoogleAuthorizationCodeFlow.Initializer 
{ 
    ClientSecrets = new ClientSecrets 
    { 
     ClientId = Constants.API.Google.ClientID, 
     ClientSecret = Constants.API.Google.ClientSecret 
    }, 
    Scopes = new[] { YouTubeService.Scope.Youtube } 
}; 
var flow = new AuthorizationCodeFlow(initializer); 
TokenResponse token = flow.LoadTokenAsync("user", CancellationToken.None).Result; 

하지만 때마다 내가 TokenResponse token에 null을 얻고 통해 YouTube에 동영상을 업로드 할 수있는 방법이 있는가, 나는

flow.LoadTokenAsync("user", CancellationToken.None)user 대신에 통과 감사해야하는지 모르겠습니다.

+0

클라이언트 라이브러리에서 문제로 게시하는 것이 좋습니다. https://github.com/google/google-api-dotnet-client/issues – DaImTo

답변

1

구글 .Net 클라이언트 라이브러리가 현재 Xamarin을 지원하지 않을까 우려했기 때문에. 참조하십시오 문제 : GoogleWebAuthorizationBroker가 Google.Apis.Auth.PlatformServices에서 여러 클래스를 필요로하고, Google.Apis.Auth.PlatformServices는 자 마린과 호환되지 않기 때문에 Unable to Google.Apis.Auth.PlatformServices in Xamarin.Forms

그것입니다.

+0

그래서 다른 방법이 있습니까? –

+0

공식 클라이언트 라이브러리를 사용하지 않습니다. 이 코드를 직접 작성해야합니다. YouTube API는 서비스 계정을 지원하지 않으므로 Chris의 추천은 작동하지 않습니다. – DaImTo

+0

그럼, HttpClient를 사용해야한다는 말입니까? –