google-analytics - NativeApplicationClient.ClientIdentifier 未解析

标签 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.ClientIdentifier也不是 provider.Secret正在得到解决。我指的是 DotNetOpenAuth 版本 4.0.0.11165 和 Google API 版本 v201306。

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

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

问候,
苏布拉塔

最佳答案

您正在构建什么类型的应用程序(Web、服务帐户、已安装的应用程序)?您获取 oath token 的方式会根据它是什么类型的应用程序而有所不同。

关于google-analytics - NativeApplicationClient.ClientIdentifier 未解析,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18436099/

相关文章:

javascript - Google Apps 脚本应用程序突然执行缓慢/出错

javascript - 谷歌 API : Blink background color of a column cell in table chart

c# - DotNetOpenAuth OpenID 提供商 "Sequence contains more than one element"

database-design - 什么是带有 OpenId 的 Forms 身份验证的良好数据库架构?

ios - Google Analytics IOS SDK session 超时

php - 如果语言不在 URL 中,如何在谷歌分析中检查每种语言的访问数据

java - 需要帮助将身份验证迁移到 Google Analytics 中的 OAuth2.0

javascript - 如何在环聊应用程序(在 xml 文件中)中加载 jquery 以进行一些 ajax 调用

asp.net-mvc-4 - 自定义 DotnetOpenauth Paypal 客户端( key 不存在)

javascript - 如何使用自定义变量来代替增强型电子商务数据层来进行产品印象?