0

希望有人也遇到過這個問題;的Windows 10 UWP應用:GoogleWebAuthorizationBroker;無法啓動瀏覽器異常

我建立一個通用的Windows平臺(UWP)在Windows 10應用程序從谷歌網站管理員工具API消耗數據,當我嘗試使用谷歌的Web授權代理授權我碰到以下情況例外:

的InnerException = {System.NotSupportedException:無法與「啓動瀏覽器https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&response_type=code&client_id=437110116900-jfsnbikhkj8l4aetubtkn52ggki45nm0.apps.googleusercontent.com&redirect_uri=http:%2F%2F127 ....

代碼片段:

string[] scopes = new string[] { 
       WebmastersService.Scope.Webmasters 
      }; 

using (var stream = new FileStream("client_secret.json", 
            FileMode.Open, FileAccess.Read)) 
       { 
        UserCredential credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
        GoogleClientSecrets.Load(stream).Secrets, 
        scopes, 
        userName, 
        CancellationToken.None, 
        new FileDataStore(".", true)).Result; 
       } 

感謝提前:)

乾杯, 保羅

+0

,我發現在該控件的發佈說明這個小寶石: - UWP(將建立,但不知道在運行時工作) 好像我在浪費時間用這種方法。 –

回答

相關問題