0

I took 3 or 4 days to research how to login in Google API and get the accessToken. I use Google APIs v1.13.1.0.

I followed this article and it always hangs there:

credential = await GoogleWebAuthorizationBroker.AuthorizeAsync(new Uri("ms-appx:///client_secrets.json"), new[] { YouTubeService.Scope.YoutubeUpload }, "user", CancellationToken.None);

Does somebody know why?

Thanks!

meucaa
  • 1,455
  • 2
  • 13
  • 27
fangchao
  • 11
  • 3
  • no response,no crash,just stop here,and i can't get anything response,YouTubeService can't be init – fangchao Jun 07 '16 at 09:45
  • Try enclosing `YouTubeService.Scope.YoutubeUpload` to `Uri.EscapeUriString(YouTubeService.Scope.YoutubeUpload)`? Following the sample code for [Windows 8.1 applications](https://developers.google.com/api-client-library/dotnet/guide/aaa_oauth#windows-81-applications). – Mr.Rebot Jun 08 '16 at 16:36
  • Also here are some tutorials and references : [How to do 0-legged OAuth in Windows Phone 8.1](http://stackoverflow.com/questions/25848315/how-to-do-0-legged-oauth-in-windows-phone-8-1?rq=1), [Authentication using Facebook, Google and Microsoft accounts in Universal Apps](https://code.msdn.microsoft.com/windowsapps/Authentication-using-bb28840e) and [How to add Google login using OAuth 2.0 in Windows Phone 8 app](http://windowsapptutorials.com/windows-phone/google-services/how-to-add-google-login-using-oauth-2-0-in-windows-phone-8-app/) – Mr.Rebot Jun 08 '16 at 16:36

0 Answers0