このガイドに従って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 アプリケーションでこの関数をどこでどのように呼び出すことができますか?
(この質問が重複している場合は申し訳ありませんが、検索しようとすると、一般的な Google Apis ガイドへのリンクしか回答として見つかりません)