【问题标题】:instagram follow api errorInstagram 关注 api 错误
【发布时间】:2015-08-13 18:04:23
【问题描述】:

目标-C / iOS

我将使用 instagram 的 follow api。

设置网址:https://api.instagram.com/v1/users/{userid}/relationship?access_token={access_token}

参数字符串为“action=follow”,post的数据发送方式

但是,它不起作用。我收到错误消息。

meta =     {
    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.";
    "error_type" = OAuthPermissionsException;
};

当我使用 instagram 的登录 api 时,范围 = 关系 + 喜欢 ... 发送的数据

如何在 iOS 中使用 instagram follow api。

【问题讨论】:

标签: ios instagram instagram-api


【解决方案1】:

如您收到的错误中所述,您需要获得一定的权限才能执行“关注”操作。在身份验证过程中,您不能在未获得适当权限的情况下仅代表用户关注另一个帐户。

在调用授权 api 时,您可以添加一个名为 scope 的参数,该参数指定您的应用请求的权限级别。例如:scope=basic+relationships 将允许您读取所有基本用户数据,还可以代表用户关注和取消关注帐户。

【讨论】:

    【解决方案2】:

    这是一个发布请求。要向 InstagramAPI 提出发布请求,您需要将您的申请详细信息和公司详细信息提交给 Instagram 以供审核。也许其他关系端点可以在不提交您的应用程序的情况下正常工作。即使您将范围添加为 scope=likes+relationships+cmets,instagram 也只会为您提供基本权限。更多详情请访问以下链接https://instagram.com/developer/endpoints/relationships/#post_relationship

    【讨论】:

      【解决方案3】:

      自 2015 年 4 月中旬以来,Instagram 更改了其 API 指南。

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

      OAuth 2.0 规范允许您指定您向用户请求的访问权限的范围。默认情况下,所有应用程序都具有基本的读取权限,但如果您计划请求扩展访问权限,例如点赞、评论或管理友谊,则需要在授权请求中指定这些范围。 请注意,要使用这些扩展权限,您首先需要提交您的应用以供审核。有关如何提交您的应用以供审核的更多信息,请查看您计划的端点的文档使用。

      因此,您需要先让您的应用通过 instagram 审核,才能使用这些扩展权限,例如点赞、评论和关系。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-09-27
        • 1970-01-01
        • 2019-03-07
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多