0
我跟着this guide使用Google OAuth 2.0授權,但我無法理解如何實現在我的應用程序中檢索訪問和刷新令牌的請求。該代碼,作爲指導說的,是當前:WP7 C#檢索Google OAuth 2.0請求的訪問令牌
// Request an access token
OAuthAuthorization authorization = new OAuthAuthorization(
"https://accounts.google.com/o/oauth2/auth",
"https://accounts.google.com/o/oauth2/token");
TokenPair tokenPair = await authorization.Authorize(
ClientId,
ClientSecret,
new string[] {GoogleScopes.CloudPrint, GoogleScopes.Gmail});
// Request a new access token using the refresh token (when the access token was expired)
TokenPair refreshTokenPair = await authorization.RefreshAccessToken(
ClientId,
ClientSecret,
tokenPair.RefreshToken);
在哪裏,我怎麼可以調用這個函數在一個通用的Windows Phone應用程序?
(很抱歉,如果有這個問題,這是重複的,但我嘗試搜索,我只覺得作爲答案的鏈接通用谷歌蜜蜂指南)
嗯,我試圖編譯我的Youtube應用程序與PCL官方Dotnet庫,但每次它無法在啓動時運行....我不知道是否與Windows Phone 7的問題或其他原因.. –
你會得到任何信息是什麼樣的例外嗎? – androphone