Instagram relationship (POST) api is not working in iOS app

安稳与你 提交于 2019-12-10 21:44:21

问题


I'm developing an iOS iPhone app using Instagram API, in which user allow to follow another user account using Instagram Relationship API and I'm always getting an error for this API request:

API request:

https://api.instagram.com/v1/users/157xxxx469/relationship?access_token=169527xxxx.f71bc56.fb2a414a0ee7469ca381a3659f5cxxxx

Response Received:

{
  "meta": {
    "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."
  }
}

When I'm authorized with scope at the time of login I use the URL below for the request:

https://api.instagram.com/oauth/authorize/?client_id=56a6xxxx6a8b41f288477fxxxxea253e&redirect_uri=http://localhost:8888/MAMP/&response_type=token&scope=likes+comments+relationships

But I am surprise that users ask for access only basic info permission not relationship ,comments or like.

Please refer to the screenshot below:

I can't tell whether I've been granted the privilege or not to consume the Instagram Relationship API; how can I possibly check that?

Also, what am I doing wrong and how can I resolve it?


回答1:


Once approved you will see the permission in the authorization screen, like this:

Follow/Unfollow other users



来源:https://stackoverflow.com/questions/30431427/instagram-relationship-post-api-is-not-working-in-ios-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!