2013-06-28 1 views
0

Xamarin을 사용하여 Android Phone에서 .NET API를 사용하여 비디오를 업로드하려고합니다. 인증 할 수 없으며 제목에 오류가 표시됩니다. 여기에 자 마린의 코드입니다 :요청을하려면 인증을 받아야합니다. - GoogleAuthenticator

https://github.com/xamarin/google-apis/blob/master/src/Android/Google.Apis.Android/Apis/Authentication/GoogleAuthenticator.cs

내가 HttpScoop 사용되는 어떤 웹 트래픽이없는 나타납니다. 웹 애플리케이션

클라이언트 ID

클라이언트 ID :

나는 웹 응용 프로그램의 ID를 사용하고

* .apps.googleusercontent.com

이메일 주소 :

* @ developer.gserviceaccount.com

비밀 클라이언트 :

-*

리디렉션 된 URI : http://jmawebtechnologies.com

자바 스크립트 기원 : 나는 구글을 만드는 방법 http://jmawebtechnologies.com 여기

입니다 인증 자 :

GoogleAuthenticator Auth() 
{ 
return new Google.Apis.Authentication.OAuth2.GoogleAuthenticator (ClientID, new Uri ("http://jmawebtechnologies.com"),                  Google.Apis.Youtube.v3.YoutubeService.Scopes.YoutubeUpload.ToString()); 
} 
+1

귀하가 서버에 보내는 정확한 요청을 볼 수있는 피들러 또는 비슷한 것을 실행할 수 있습니까? – peleyal

+0

나는 그것을 실행했다. 트래픽이없는 것 같습니다. 내 새로운 요청 이미지를 참조하십시오. –

답변

0

내가 GetUI를 호출해야한다는 것을 알았습니다. 그러면 사용자가 Google에 로그인하는 브라우저 창이 열립니다.

StartActivity(auth2.GetUI (this)); 

        auth2.Completed += (sender, eventArgs) => { 


         if (eventArgs.IsAuthenticated) { 
          MakeAlert("Is auth", "Accepted!"); 
         } else { 
          // The user cancelled 
          MakeAlert("Is not auth", "failure"); 
         } 
        }; 
+0

안녕하세요, 인증을 받으셨습니까? auth2 코드를 게시 할 수 있습니까? 감사 – senzacionale

관련 문제