Create, delete, and query Comments on a media object. Requires the instagram_basic and instagram_manage_comments scopes.
Only the select, delete, and insert operations are supported.
The driver will use the Instagram APIs to filter results by MediaId and will execute other filters client-side within itself. You can turn off the client-side execution of the query by setting SupportEnhancedSQL to false, in which case any search criteria that refers to other columns will cause an error.
The following query returns all comments on all media in your account. UserId will be null if the comment is from an account that is not a business account.
SELECT * FROM Comments
To query comments for a specific media object, MediaId is required. The MediaId column supports the = operator. For example:
SELECT * FROM Comments WHERE MediaId = '1501471279105199430_5380790872'
Create a comment on a media object with the following rules:
- MediaId and Text are the only available and required fields.
- The total length of the comment cannot exceed 300 characters.
- The comment cannot contain more than 4 hashtags.
- The comment cannot contain more than 1 URL.
- The comment cannot consist of all capital letters.
INSERT INTO Comments (MediaId, Text) VALUES ('1501471279105199430_5380790872', 'My comment text #instadevelopers')
UpdateUpdate is not supported.
Id (the comment's primary key) is required. For example, the following query removes a comment either on the authenticated user's media object or authored by the authenticated user.
DELETE FROM Comments WHERE Id = '1668776136772254'
The unique identifier for the comment.
The text of the comment.
The unique identifier for the media.
The time when the media was created.
The unique identifier for the user.
The username for the user.
The number of likes.
The boolean that shows if the comment is hidden.