【问题标题】:Cannot run PlusDomains example in Google App Maker无法在 Google 应用制作工具中运行 PlusDomains 示例
【发布时间】:2020-04-28 23:45:56
【问题描述】:

我正在尝试在 Google 应用制作工具中运行 this 示例代码:

/**
 * The following example demonstrates how to create a post that is available
 * to all users within your G Suite domain.
 */
function createPost() {
  var userId = 'me';
  var post = {
    object: {
      originalContent: 'Happy Monday! #caseofthemondays'
    },
    access: {
      items: [{
        type: 'domain'
      }],
      domainRestricted: true
    }
  };

  post = PlusDomains.Activities.insert(post, userId);
  Logger.log('Post created with URL: %s', post.url);
}

但是,我不断得到这个:

GoogleJsonResponseException: Access to the Google+ Domains API is not allowed as the user has consented to incompatible scopes. 

还有其他人设法让这个工作吗?

【问题讨论】:

  • 您分享的链接中提供的 sn-p 对我来说很好用。您可以尝试创建全新的 App Maker 应用程序并检查它是否可以在那里工作。如果它不会......那么也许您可以尝试使用您的域配置。在这里您可以找到更多提示:stackoverflow.com/questions/22904417

标签: google-plus google-app-maker


【解决方案1】:

Pavel 的链接给出了答案:我只需要删除https://security.google.com/settings/security/permissions 的所有访问权限,然后重新授权。

谢谢,帕维尔!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多