【问题标题】:Drupal 7 feeds, permission-error with oauth for instagram ("public_content")Drupal 7 提要,instagram 的 oauth 权限错误(“public_content”)
【发布时间】:2016-06-27 14:16:23
【问题描述】:

2015 年初,我开始使用 drupal 7 创建一个网站,该网站通过 Drupal Feeds 导入 instagram 内容(图像、喜欢、cmets 等)。一切正常,但项目停止了。

现在看来我们又开始了,但突然导入不再起作用。我总是收到以下错误:

{"meta": {"error_type": "OAuthPermissionsException", "code": 400, "error_message": "这个请求需要 scope=public_content,但是这个 访问令牌未获得此范围的授权。用户必须 使用 scope=public_content 重新授权您的应用程序以被授予 此权限。"}}

我不必早先发送“public_content”,所以我只是发送“基本”范围的访问。正如我所说,一切运行良好。 现在,我还在 oauth-Module 中为提要插入了“public_content”的范围以及“basic”。但仍然收到上面的错误消息。

对此有任何提示吗?

提前致谢和问候, 棒棒哒

【问题讨论】:

  • 我很想知道你是怎么解决的。

标签: drupal instagram-api drupal-feeds


【解决方案1】:

This is due to a Instagram Platfrom Update

您必须像 Joshi 指出的那样添加 public_content 范围 - 而且您需要在设置页面中更新您的身份验证令牌。

那你就可以走了。

【讨论】:

    【解决方案2】:

    解决方法如下: 在 instagram_social_feed.module 中使用以下代码 函数:instagram_social_feed_settings()

     if (variable_get('instagram_social_feed_client_id', '') != '' && variable_get('instagram_social_feed_redirect_uri', '') != '') { 
          $form['authenticate'] = array( 
            '#markup' => l(t('Click here to authenticate via Instagram and create an access token'), 
             'https://api.instagram.com/oauth/authorize/?client_id=' . variable_get('instagram_social_feed_client_id') . '&redirect_uri=' . variable_get('instagram_social_feed_redirect_uri') . '&response_type=code&scope=public_content' 
            ) 
          ); 
        }
    

    这将解决问题

    【讨论】:

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