Dharmendra Kumar Rajan
Dharmendra Kumar Rajan

Reputation: 229

How to comment on instagram feed in ios application

I have follow the link instagram developer site and hit the api https://api.instagram.com/v1/media/{media-id}/comments and sending parameter text=testing.. for comments but I have got this response

 {
  "meta":  {
    "error_type": "OAuthPermissionsException",
    "code": 400,
    "error_message": "This request requires scope=comments, but this access token is not authorized with this scope. The user must re-authorize your application with scope=comments to be granted write permissions."
  }
}

and this:

Error Domain=instagramErrorDomain Code=400 "The operation couldn’t be completed. (instagramErrorDomain error 400.)" UserInfo=0xeb7ab40 {error_message=This client ID is not permitted to POST comments. For more info, please refer to our developer site at http://instagram.com/developer/endpoints/comments., error_type=APIError}

Please any suggestions. Thanks in Advance.

Upvotes: 0

Views: 1493

Answers (1)

Meenakshi
Meenakshi

Reputation: 1162

There might be 2 reason for this.

1) You need to post valid acessToken in your request.

2) Your app is not authorised to post comment. You have to request Instragram to allow your app to post comment.

http://instagram.com/developer/endpoints/comments/

Upvotes: 2

Related Questions