首页 文章

Drupal 7提供,与oauth for instagram(“public_content”)的权限错误

提问于
浏览
0

在2015年早些时候,我开始使用drupal 7创建一个网站,通过Drupal Feeds导入Instagram内容(图像,喜欢,评论等) . 一切顺利,但项目停止了 .

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

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

我之前不必发送“public_content”,所以我只是发送“基本”-scope访问权限 . 正如我所说,一切都运作良好 . 现在我在oauth-Module for feeds中插入了“public_content”的范围以及“basic” . 但仍然得到上面的错误消息 .

有什么提示吗?

在此先感谢和问候,Fab

2 回答

  • 0

    This is due to a Instagram Platfrom Update

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

    然后你会好起来的 .

  • 1

    以下是解决方案:在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' 
            ) 
          ); 
        }
    

    这将解决问题

相关问题