Instagram PHP API无效登录URL和范围请求

时间:2015-07-23 18:15:42

标签: instagram instagram-api

我在Instagram API中使用以下PHP库:

https://github.com/cosenary/Instagram-PHP-API

我的网络PHP应用程序成功生成以下登录URL到Instagram:

https://api.instagram.com/oauth/authorize?client_id=ec3a193ca6ad40b2aec8370f1fb53b86&redirect_uri=http%3A%2F%2Flocalhost%2Fdashboard.php&scope=basic+relationships+likes+comments&response_type=code

当我登录时,我只看到这个范围:

Access your basic information - Includes photos, friend lists & profile info

然后,当我尝试修改关系(跟随用户)时,我看到以下错误:

[error_type] => OAuthPermissionsException
[code] => 400
[error_message] => This request requires scope=relationships, but this access token is not authorized with this scope. The user must re-authorize your application with scope=relationships to be granted write permissions.

1 个答案:

答案 0 :(得分:1)

Instagram现在要求您向他们请求特别许可,以便POST或DELETE跟随,喜欢和评论。因此,在Instagram授予您这些权限之前,您将无法关注API用户。

您可以在此处申请访问权限:https://help.instagram.com/contact/185819881608116

仅供参考,以下是来自Instagram的关于请求这些权限的指南:" POST和DELETE喜欢,跟随和评论的能力仅限于提供商业服务的应用程序,而不是面向消费者的应用程序。"