【问题标题】:Authsub authentication with the GAPI code for Google Analytics API使用 Google Analytics API 的 GAPI 代码进行 Authsub 身份验证
【发布时间】:2011-10-01 03:27:17
【问题描述】:

我正在构建一个需要使用 Authsub 对用户进行身份验证的应用程序。我已经将 authsub 令牌存储为 $sessiontoken

我想将它与 Google Analytics PHP 接口 (GAPI) 一起使用,但它只支持硬编码的用户名和密码:

`define('ga_email','removed@gmail.com');

define('ga_password','removed');

define('ga_profile_id','removed');

需要'gapi.class.php';

$ga = new gapi(ga_email,ga_password);`

如何在此处使用我的 authsub 令牌?

【问题讨论】:

    标签: php api google-analytics analytics authsub


    【解决方案1】:

    令牌可以作为可选参数传递到构造函数的末尾。只需使用null 作为用户名和密码,然后使用您的身份验证令牌:

    $ga = new gapi(null, null, $authToken);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-06-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-29
      • 2013-06-24
      • 2021-08-18
      • 2012-11-27
      相关资源
      最近更新 更多