NativeApplicationClient.ClientIdentifier未解析

时间:2013-08-26 03:15:28

标签: google-analytics google-api dotnetopenauth google-analytics-api

我已经提到过这篇文章 Google Authentication Process ,这与我的问题不完全相似,但我使用的代码类似。

using System;
using DotNetOpenAuth.OAuth2;
using Google.Apis.Authentication.OAuth2;
using Google.Apis.Authentication.OAuth2.DotNetOpenAuth;
using Google.Apis.Samples.Helper;

private void Window_Initialized(object sender, EventArgs e)
{
     var provider = new NativeApplicationClient(GoogleAuthenticationServer.Description);
     provider.ClientIdentifier = "<My Client Id here>";
     provider.ClientSecret = "<My Client Secret here";
     ...
     ...
}

我的问题是provider.ClientIdentifierprovider.Secret都没有得到解决。我引用了DotNetOpenAuth版本4.0.0.11165和Google API版本v201306。

我的目标是从不同的帐户获取Google Analytic数据,但在此之前,我需要对用户进行身份验证,Google可以通过提供Access_Token来允许他离线访问!

请让我知道我做错了什么。

此致 Subrata

1 个答案:

答案 0 :(得分:0)

您正在构建哪种类型的应用程序(Web,服务帐户,已安装的应用程序)?获取誓言令牌的方式会根据应用程序的类型而变化。