Instagram Api与包python-instagram改变范围

时间:2014-10-15 08:34:51

标签: python api scope instagram instagram-api

我使用了python-instagram我希望更改范围但是使用包python-instagram我不知道怎么做?我看到了代码,但我找不到可以改变的地方?

我需要改变添加"关系的范围"范围,因为我有一个错误:

  

错误:(400)OAuthPermissionsException - 此请求需要scope = relationships,但此访问令牌未获得此授权   范围。用户必须使用重新授权您的应用程序   scope =要授予写权限的关系。

3 个答案:

答案 0 :(得分:1)

当您授权应用并获取访问令牌时,您需要声明范围。您可以通过创建如下URL来授权您的app / get令牌:

https://instagram.com/accounts/login/?force_classic_login=&next=/oauth/authorize?scope={relationships comments likes}&redirect_uri={redirect uri}&response_type=code&client_id={client id}

只需传入scope参数中的作用域。

答案 1 :(得分:0)

您需要获得Instagram的许可才能使用这些范围:关系,评论和喜欢。以下是表格的链接必须填写才能提交您的许可请求。

https://help.instagram.com/contact/185819881608116

希望你得到你想要的东西。

答案 2 :(得分:0)

2015年11月17日之后,很多许可在Instagram上受到限制。您必须提交获取该范围的权限请求。请参考以下链接: